mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-119983 Smart type completion mixes order for Color.RED
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
class MyColor {
|
||||
static final MyColor RED = null;
|
||||
}
|
||||
class Another {
|
||||
static final MyColor RED = null;
|
||||
}
|
||||
|
||||
class Foo {
|
||||
public static final MyColor MARKED_BACKGROUND = new MyColor();
|
||||
|
||||
{
|
||||
MyColor color = RED<caret>
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -203,7 +203,7 @@ public class SecondSmartTypeCompletionTest extends LightFixtureCompletionTestCas
|
||||
|
||||
public void testGlobalFactoryMethods() {
|
||||
configure();
|
||||
assertStringItems("createExpected", "Constants.SUBSTRING", "createSubGeneric", "createSubRaw", "createSubString");
|
||||
assertStringItems("Constants.SUBSTRING", "createExpected", "createSubGeneric", "createSubRaw", "createSubString");
|
||||
}
|
||||
|
||||
public void testEmptyMapPresentation() {
|
||||
|
||||
+8
-1
@@ -149,7 +149,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testBooleanValueOf() throws Throwable {
|
||||
checkPreferredItems(0, "b", "valueOf", "valueOf", "Boolean.FALSE", "Boolean.TRUE");
|
||||
checkPreferredItems(0, "b", "Boolean.FALSE", "Boolean.TRUE", "equals", "false", "true", "valueOf", "valueOf");
|
||||
}
|
||||
|
||||
public void testXmlTagGetAttribute() throws Throwable {
|
||||
@@ -333,6 +333,13 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
assertPreferredItems 0, 'newLinkedSet1', 'newLinkedSet0', 'newLinkedSet2'
|
||||
}
|
||||
|
||||
public void testPreferExpectedTypeMembers() {
|
||||
configureNoCompletion(getTestName(false) + ".java")
|
||||
myFixture.complete(CompletionType.SMART, 2)
|
||||
assertPreferredItems 0, 'MyColor.RED', 'Another.RED'
|
||||
assert lookup.items.size() == 2
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return JavaTestUtil.getRelativeJavaTestDataPath() + BASE_PATH;
|
||||
|
||||
+1
-1
@@ -774,7 +774,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
}
|
||||
public void testNoClassLiteral() throws Exception {
|
||||
doActionTest();
|
||||
assertStringItems("Object.class", "forName", "forName", "getClass");
|
||||
assertStringItems("Object.class", "getClass", "forName", "forName");
|
||||
}
|
||||
|
||||
public void testClassLiteralInAnno2() throws Throwable {
|
||||
|
||||
Reference in New Issue
Block a user