mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
classes are not subject to the 'passing object to itself' sorting heuristic
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import foo.Foo;
|
||||
|
||||
class Bar {
|
||||
{
|
||||
Foo.foo(Foo<caret>x)
|
||||
}
|
||||
}
|
||||
+10
@@ -160,4 +160,14 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
assertEquals("Foooo.Bar", presentation.getItemText());*/
|
||||
}
|
||||
|
||||
public void testClassInCallOfItsMethod() throws Throwable {
|
||||
final VirtualFile foo = getSourceRoot().createChildDirectory(this, "foo");
|
||||
VfsUtil.saveText(foo.createChildData(this, "Foo.java"), "package foo; public interface Foo {}");
|
||||
final VirtualFile bar = getSourceRoot().createChildDirectory(this, "bar");
|
||||
VfsUtil.saveText(bar.createChildData(this, "Foo.java"), "package bar; public interface Foo {}");
|
||||
|
||||
checkPreferredItems(0, "Foo", "Foo");
|
||||
assertEquals("foo.Foo", ((JavaPsiClassReferenceElement)getLookup().getCurrentItem()).getQualifiedName());
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -194,7 +194,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testFactoryMethodForDefaultType() throws Throwable {
|
||||
checkPreferredItems(0, "create", "map", "this", "getClass");
|
||||
checkPreferredItems(0, "create", "this", "map", "getClass");
|
||||
}
|
||||
|
||||
public void testLocalVarsBeforeClassLiterals() throws Throwable {
|
||||
|
||||
Reference in New Issue
Block a user