mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Object methods are nothing special, don't put them to the top
This commit is contained in:
@@ -58,6 +58,9 @@ public class KnownElementWeigher extends ProximityWeigher {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName())) {
|
||||
return 0;
|
||||
}
|
||||
return getJdkClassProximity(method.getContainingClass());
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import javax.swing.*;
|
||||
|
||||
public class Foo {
|
||||
{
|
||||
new JPanel().<caret>
|
||||
}
|
||||
}
|
||||
+4
@@ -84,6 +84,10 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
checkPreferredItems(0, "booleanMethod", "voidMethod", "AN_OBJECT", "BOOLEAN", "class");
|
||||
}
|
||||
|
||||
public void testJComponentInstanceMembers() throws Throwable {
|
||||
checkPreferredItems(0, "getAccessibleContext", "getUI");
|
||||
}
|
||||
|
||||
public void testClassStaticMembersInBooleanContext() throws Throwable {
|
||||
final String path = getTestName(false) + ".java";
|
||||
myFixture.configureByFile(path);
|
||||
|
||||
Reference in New Issue
Block a user