goto popups: name should be above _name

This commit is contained in:
peter
2013-07-01 17:47:16 +02:00
parent 4c19913389
commit a9b1da4f71
3 changed files with 31 additions and 17 deletions
@@ -65,6 +65,17 @@ class Impl extends Intf {
assert !(impl.findMethodsByName('xxx1', false)[0] in elements)
}
public void "test disprefer underscore"() {
def intf = myFixture.addClass("""
class Intf {
void _xxx1() {}
void xxx2() {}
}""")
def elements = getPopupElements(new GotoSymbolModel2(project), "xxx")
assert elements == [intf.findMethodsByName('xxx2', false), ChooseByNameBase.NON_PREFIX_SEPARATOR, intf.findMethodsByName('_xxx1', false)]
}
private List<Object> getPopupElements(ChooseByNameModel model, String text) {
return getPopupElements(createPopup(model), text)
}