mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable on demand static import for private classes (IDEA-74951)
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ public class AddOnDemandStaticImportAction extends PsiElementBaseIntentionAction
|
||||
return null;
|
||||
}
|
||||
PsiClass psiClass = (PsiClass)resolved;
|
||||
if (Comparing.strEqual(psiClass.getName(), psiClass.getQualifiedName())) return null;
|
||||
if (Comparing.strEqual(psiClass.getName(), psiClass.getQualifiedName()) || psiClass.hasModifierProperty(PsiModifier.PRIVATE)) return null;
|
||||
PsiFile file = refExpr.getContainingFile();
|
||||
if (!(file instanceof PsiJavaFile)) return null;
|
||||
PsiImportList importList = ((PsiJavaFile)file).getImportList();
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Add on demand static import for 'test.Outer.State'" "false"
|
||||
package test;
|
||||
|
||||
public class Outer {
|
||||
private enum State { REDONE, UNDONE }
|
||||
|
||||
private State state = Sta<caret>te.REDONE;
|
||||
}
|
||||
Reference in New Issue
Block a user