diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java index e2bd7044f1f9..e1a7d3fc36f0 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java @@ -370,7 +370,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase { IntentionAction intentionAction = findIntentionAction(infos, intentionActionName, editor, file); assertNotNull(intentionActionName, intentionAction); - ShowIntentionActionsHandler.chooseActionAndInvoke(file, editor, intentionAction, intentionActionName); + assertTrue(ShowIntentionActionsHandler.chooseActionAndInvoke(file, editor, intentionAction, intentionActionName)); } protected static IntentionAction findIntentionAction(final Collection infos, final String intentionActionName, final Editor editor, diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/ShowIntentionActionsHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/ShowIntentionActionsHandler.java index f3aeded47613..62a6b8a7dcb9 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/ShowIntentionActionsHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/ShowIntentionActionsHandler.java @@ -193,7 +193,7 @@ public class ShowIntentionActionsHandler implements CodeInsightActionHandler { return Pair.create(fileToApply, editorToApply); } - public static void chooseActionAndInvoke(PsiFile hostFile, final Editor hostEditor, final IntentionAction action, final String text) { + public static boolean chooseActionAndInvoke(PsiFile hostFile, final Editor hostEditor, final IntentionAction action, final String text) { final Project project = hostFile.getProject(); Pair pair = chooseBetweenHostAndInjected(hostFile, hostEditor, new PairProcessor() { @@ -201,7 +201,7 @@ public class ShowIntentionActionsHandler implements CodeInsightActionHandler { return availableFor(psiFile, editor, action); } }); - if (pair == null) return; + if (pair == null) return false; final Editor editorToApply = pair.second; final PsiFile fileToApply = pair.first; @@ -227,5 +227,6 @@ public class ShowIntentionActionsHandler implements CodeInsightActionHandler { } CommandProcessor.getInstance().executeCommand(project, runnable, text, null); + return true; } }