From c686d0da001f18c431ff01d093eeedc3ed470f0a Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 11 Jul 2016 12:15:31 +0300 Subject: [PATCH] ERROR: Original indicator must be StandardProcessIndicator --- .../codeInsight/daemon/impl/ShowIntentionsPass.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java index 12028ab30314..51bc88c3e8a6 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java @@ -84,7 +84,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { final int offset = ((EditorEx)editor).getExpectedCaretOffset(); final Project project = file.getProject(); - final List result = new ArrayList(); + final List result = new ArrayList<>(); DaemonCodeAnalyzerImpl.processHighlightsNearOffset(editor.getDocument(), project, HighlightSeverity.INFORMATION, offset, true, info -> { addAvailableActionsForGroups(info, editor, file, result, passId, offset); return true; @@ -244,7 +244,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { private static boolean appendCleanupCode(@NotNull List actionDescriptors, @NotNull PsiFile file) { for (HighlightInfo.IntentionActionDescriptor descriptor : actionDescriptors) { if (descriptor.canCleanup(file)) { - final ArrayList options = new ArrayList(); + final ArrayList options = new ArrayList<>(); options.add(EditCleanupProfileIntentionAction.INSTANCE); options.add(CleanupOnScopeIntention.INSTANCE); actionDescriptors.add(new HighlightInfo.IntentionActionDescriptor(CleanupAllIntention.INSTANCE, options, "Code Cleanup Options")); @@ -303,7 +303,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { (psiFile, editor) -> ShowIntentionActionsHandler.availableFor(psiFile, editor, action)); if (place != null) { - List enableDisableIntentionAction = new ArrayList(); + List enableDisableIntentionAction = new ArrayList<>(); enableDisableIntentionAction.add(new IntentionHintComponent.EnableDisableIntentionAction(action)); enableDisableIntentionAction.add(new IntentionHintComponent.EditIntentionSettingsAction(action)); HighlightInfo.IntentionActionDescriptor descriptor = new HighlightInfo.IntentionActionDescriptor(action, enableDisableIntentionAction, null); @@ -367,7 +367,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { final Set dialectIds = InspectionEngine.calcElementDialectIds(elements); final LocalInspectionToolSession session = new LocalInspectionToolSession(hostFile, 0, hostFile.getTextLength()); - final Processor processor = (toolWrapper) -> { + final Processor processor = toolWrapper -> { final LocalInspectionTool localInspectionTool = toolWrapper.getTool(); final HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName()); final String displayName = toolWrapper.getDisplayName(); @@ -397,7 +397,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { localInspectionTool.inspectionFinished(session, holder); return true; }; - JobLauncher.getInstance().invokeConcurrentlyUnderProgress(intentionTools, new EmptyProgressIndicator(), false, processor); + JobLauncher.getInstance().invokeConcurrentlyUnderProgress(intentionTools, new DaemonProgressIndicator(), false, processor); } } }