problems tag get duplicated sometimes

This commit is contained in:
Alexey Kudravtsev
2015-05-21 14:15:09 +03:00
parent ecd366bd59
commit bf17c93b1d
@@ -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<File> inspectionsResults, @Nullable String outputPath) {
@NonNls final String ext = ".xml";