mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-109171 Code completion is suggesting to implement a class
This commit is contained in:
@@ -68,7 +68,7 @@ public class JavaCompletionSorting {
|
||||
CompletionSorter sorter = CompletionSorter.defaultSorter(parameters, result.getPrefixMatcher());
|
||||
if (!smart && afterNew) {
|
||||
sorter = sorter.weighBefore("liftShorter", new PreferExpected(true, expectedTypes));
|
||||
} else {
|
||||
} else if (PsiTreeUtil.getParentOfType(position, PsiReferenceList.class) == null) {
|
||||
sorter = ((CompletionSorterImpl)sorter).withClassifier("liftShorterClasses", true, new LiftShorterClasses(position));
|
||||
}
|
||||
if (smart) {
|
||||
|
||||
+2
-4
@@ -1,8 +1,6 @@
|
||||
interface FooIntf {}
|
||||
class FooClass {}
|
||||
class Foo {}
|
||||
|
||||
class Goo implements Foo<caret> {
|
||||
int boo() {}
|
||||
int doo() {}
|
||||
int foo() {}
|
||||
class Goo implements Fo<caret> {
|
||||
}
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testPreferInterfacesInImplements() {
|
||||
checkPreferredItems(0, "FooIntf", "FooClass");
|
||||
checkPreferredItems(0, "FooIntf", "Foo", "FooClass");
|
||||
}
|
||||
|
||||
public void testPreferClassesInExtends() {
|
||||
|
||||
Reference in New Issue
Block a user