Object methods are nothing special, don't put them to the top

This commit is contained in:
peter
2012-06-19 18:41:08 +02:00
parent e17ef2edb6
commit f714f0a44c
3 changed files with 14 additions and 0 deletions
@@ -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());
}
}
@@ -0,0 +1,7 @@
import javax.swing.*;
public class Foo {
{
new JPanel().<caret>
}
}
@@ -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);