IDEA-73509: Spring Model / Spring Facet inspection: "Inspection 'Spring Facet' option...
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Fri, 27 Jan 2012 12:01:41 +0000 (16:01 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Mon, 30 Jan 2012 06:37:02 +0000 (10:37 +0400)
platform/lang-impl/src/com/intellij/codeInsight/intention/impl/FileLevelIntentionComponent.java

index 37279aebd926116abd474f8b26a1b0cd2be51704..89b8754f61d307d096f38ab9931ffc1d9da507d8 100644 (file)
@@ -19,6 +19,8 @@ package com.intellij.codeInsight.intention.impl;
 import com.intellij.codeInsight.daemon.impl.HighlightInfo;
 import com.intellij.codeInsight.daemon.impl.SeverityRegistrar;
 import com.intellij.codeInsight.daemon.impl.ShowIntentionsPass;
+import com.intellij.codeInsight.intention.EmptyIntentionAction;
+import com.intellij.codeInsight.intention.IntentionAction;
 import com.intellij.lang.annotation.HighlightSeverity;
 import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.project.Project;
@@ -57,10 +59,14 @@ public class FileLevelIntentionComponent extends EditorNotificationPanel {
       for (Pair<HighlightInfo.IntentionActionDescriptor, TextRange> intention : intentions) {
         final HighlightInfo.IntentionActionDescriptor descriptor = intention.getFirst();
         info.intentionsToShow.add(descriptor);
-        final String text = descriptor.getAction().getText();
+        final IntentionAction action = descriptor.getAction();
+        if (action instanceof EmptyIntentionAction) {
+          continue;
+        }
+        final String text = action.getText();
         createActionLabel(text, new Runnable() {
           public void run() {
-            ShowIntentionActionsHandler.chooseActionAndInvoke(psiFile, editor, descriptor.getAction(), text);
+            ShowIntentionActionsHandler.chooseActionAndInvoke(psiFile, editor, action, text);
           }
         });
       }