mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
enable static import quick fix on "method expected" error (IDEA-169966)
This commit is contained in:
@@ -456,6 +456,7 @@ public class HighlightMethodUtil {
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, range, QUICK_FIX_FACTORY.createCreateMethodFromUsageFix(methodCall));
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, range, QUICK_FIX_FACTORY.createCreateAbstractMethodFromUsageFix(methodCall));
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, range, QUICK_FIX_FACTORY.createCreatePropertyFromUsageFix(methodCall));
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, range, QUICK_FIX_FACTORY.createStaticImportMethodFix(methodCall));
|
||||
if (resolved instanceof PsiVariable && languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
PsiMethod method = LambdaUtil.getFunctionalInterfaceMethod(((PsiVariable)resolved).getType());
|
||||
if (method != null) {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Import static method 'java.util.Collections.emptyList'" "true"
|
||||
import java.util.List;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
public class X {
|
||||
String emptyList = "";
|
||||
List<String> get() {
|
||||
return emptyList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Import static method 'java.util.Collections.emptyList'" "true"
|
||||
import java.util.List;
|
||||
public class X {
|
||||
String emptyList = "";
|
||||
List<String> get() {
|
||||
return <caret>emptyList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user