suggest to delete type arguments when they are not expected (IDEA-79300)
[idea/community.git] / java / java-impl / src / com / intellij / codeInsight / daemon / impl / analysis / GenericsHighlightUtil.java
index 3d5cc6306f2876355101a58c2c37da5dd639e1e6..4a0ed734758352648ab055b42224be7e83eff5b0 100644 (file)
@@ -157,6 +157,9 @@ public class GenericsHighlightUtil {
           if (pparent instanceof PsiTypeElement) {
             PsiElement variable = pparent.getParent();
             if (variable instanceof PsiVariable) {
+              if (targetParametersNum == 0) {
+                QuickFixAction.registerQuickFixAction(highlightInfo, new RemoveTypeArgumentsFix(variable), null);
+              }
               VariableParameterizedTypeFix.registerIntentions(highlightInfo, (PsiVariable)variable, referenceParameterList);
             }
           }