"initialize variable" & "initialize in constructor" suggests only public classes...
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Fri, 6 Nov 2015 12:59:45 +0000 (15:59 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Fri, 6 Nov 2015 13:02:14 +0000 (16:02 +0300)
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddVariableInitializerFix.java

index c12e64fdf25b7913722397e87862a87faf0f26e7..1c69fae0762596808d368df0ae20d9028389a13e 100644 (file)
@@ -145,6 +145,7 @@ public class AddVariableInitializerFix implements IntentionAction {
               if (psiClass != null &&
                   !psiClass.isInterface() &&
                   !psiClass.hasModifierProperty(PsiModifier.ABSTRACT) &&
               if (psiClass != null &&
                   !psiClass.isInterface() &&
                   !psiClass.hasModifierProperty(PsiModifier.ABSTRACT) &&
+                  psiClass.hasModifierProperty(PsiModifier.PUBLIC) &&
                   PsiUtil.hasDefaultConstructor(psiClass)) {
                 suggestedTypes.add(type);
               }
                   PsiUtil.hasDefaultConstructor(psiClass)) {
                 suggestedTypes.add(type);
               }