From bf17c93b1dc1938e8846327b531d29cc8d3fac36 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 21 May 2015 14:15:09 +0300 Subject: [PATCH] problems tag get duplicated sometimes --- .../ex/GlobalInspectionContextImpl.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index ce5e9b6cbfae..29057fce81fe 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -167,27 +167,27 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp cleanupTools(); setCurrentScope(scope); - DefaultInspectionToolPresentation.setOutputPath(outputPath); - try { - final Runnable action = new Runnable() { - @Override - public void run() { - performInspectionsWithProgress(scope, runGlobalToolsOnly, isOfflineInspections); + DefaultInspectionToolPresentation.setOutputPath(null); + final Runnable action = new Runnable() { + @Override + public void run() { + performInspectionsWithProgress(scope, runGlobalToolsOnly, isOfflineInspections); + DefaultInspectionToolPresentation.setOutputPath(outputPath); + try { exportResults(inspectionsResults, outputPath); } - }; - if (isOfflineInspections) { - ApplicationManager.getApplication().runReadAction(action); - } - else { - action.run(); + finally { + DefaultInspectionToolPresentation.setOutputPath(null); + } } + }; + if (isOfflineInspections) { + ApplicationManager.getApplication().runReadAction(action); } - finally { - DefaultInspectionToolPresentation.setOutputPath(null); + else { + action.run(); } } - private void exportResults(@NotNull List inspectionsResults, @Nullable String outputPath) { @NonNls final String ext = ".xml";