let exact prefix items be the ones that have exact prefix as any lookup string, not just the main one (IDEA-168948)

This commit is contained in:
peter
2017-03-04 21:59:48 +01:00
parent e66be9c21a
commit 428cba1c1b
4 changed files with 31 additions and 9 deletions
@@ -0,0 +1,11 @@
class SomeClass {
void foo(Point p) {
p.smth(JSON<caret>);
}
}
interface Point {
int FOO = 2;
int JSON = 3;
void smth(int x);
}
@@ -0,0 +1,11 @@
class SomeClass {
void foo(Point p) {
p.smth(JSON<caret>);
}
}
interface Point {
int FOO = 2;
int JSON = 3;
void smth(int x);
}
@@ -776,4 +776,9 @@ class ContainerUtil extends ContainerUtilRt {
assert LookupElementPresentation.renderElement(myFixture.lookupElements[3]).tailText.contains('int index')
}
void testPreferExpectedTypeConstantOverSameNamedClass() {
myFixture.addClass("package another; public class JSON {}")
checkPreferredItems 0, 'Point.JSON', 'JSON'
}
}