mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Collections.emptyList should accept the qualified prefix
This commit is contained in:
@@ -212,6 +212,17 @@ public class JavaMethodCallElement extends LookupItem<PsiMethod> implements Type
|
||||
return builder.append(">").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LookupItem<PsiMethod> forceQualify() {
|
||||
if (myContainingClass != null) {
|
||||
String className = myContainingClass.getName();
|
||||
if (className != null) {
|
||||
addLookupStrings(className + "." + myMethod.getName());
|
||||
}
|
||||
}
|
||||
return super.forceQualify();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderElement(LookupElementPresentation presentation) {
|
||||
final String className = myContainingClass == null ? "???" : myContainingClass.getName();
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import java.util.Collections;
|
||||
|
||||
class Foo {
|
||||
java.util.List<String> foo() {
|
||||
return Collections.emptyList();<caret>
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Foo {
|
||||
java.util.List<String> foo() {
|
||||
return Collect<caret>;
|
||||
}
|
||||
}
|
||||
+7
-15
@@ -884,25 +884,17 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
assertEquals(4, myItems.length);
|
||||
}
|
||||
|
||||
public void testInsertTypeParametersOnImporting() throws Throwable {
|
||||
doTest();
|
||||
}
|
||||
public void testInsertTypeParametersOnImporting() throws Throwable { doTest(); }
|
||||
|
||||
public void testEmptyListInReturn() throws Throwable {
|
||||
doItemTest();
|
||||
}
|
||||
public void testEmptyListInReturn() throws Throwable { doItemTest(); }
|
||||
|
||||
public void testEmptyListInReturn2() throws Throwable {
|
||||
doTest();
|
||||
}
|
||||
public void testEmptyListInReturn2() throws Throwable { doTest(); }
|
||||
|
||||
public void testEmptyListInReturnTernary() throws Throwable {
|
||||
doItemTest();
|
||||
}
|
||||
public void testEmptyListInReturnTernary() throws Throwable { doItemTest(); }
|
||||
|
||||
public void testEmptyListBeforeSemicolon() throws Throwable {
|
||||
doItemTest();
|
||||
}
|
||||
public void testEmptyListBeforeSemicolon() throws Throwable { doItemTest(); }
|
||||
|
||||
public void testEmptyListWithCollectionsPrefix() throws Throwable { doItemTest(); }
|
||||
|
||||
public void testStaticallyImportedMagicMethod() throws Throwable {
|
||||
configureByTestName();
|
||||
|
||||
Reference in New Issue
Block a user