goto class/file: support more line number denotations (IDEA-137806, IDEA-111332, IDEA-151405)

This commit is contained in:
peter
2016-02-08 20:51:22 +01:00
parent 278c7a09b3
commit f166e96420
2 changed files with 16 additions and 10 deletions
@@ -215,6 +215,15 @@ class Intf {
assert getPopupElements(new GotoClassModel2(project), 'Bar:[2,3]') == [c]
}
public void "test custom line suffixes"() {
def file = myFixture.addFileToProject("Bar.txt", "")
def model = new GotoFileModel(project)
assert getPopupElements(model, 'Bar:2') == [file]
assert getPopupElements(model, 'Bar(2)') == [file]
assert getPopupElements(model, 'Bar on line 2') == [file]
assert getPopupElements(model, 'Bar at line 2') == [file]
}
public void "test dollar"() {
def bar = myFixture.addClass("package foo; class Bar { class Foo {} }")
def foo = ApplicationManager.application.runReadAction( { bar.innerClasses[0] } as Computable)