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 7a9a54414c52..e898d9943380 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -380,17 +380,16 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp final List lTools = getWrappersFromTools(localTools, file); pass.doInspectInBatch(this, inspectionManager, lTools); - JobLauncher.getInstance().invokeConcurrentlyUnderProgress(globalSimpleTools, myProgressIndicator, false, new Processor() { + JobLauncher.getInstance().invokeConcurrentlyUnderProgress(getWrappersFromTools(globalSimpleTools, file), myProgressIndicator, false, new Processor() { @Override - public boolean process(Tools tools) { - GlobalInspectionToolWrapper toolWrapper = (GlobalInspectionToolWrapper)tools.getTool(); - GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool)toolWrapper.getTool(); - ProblemsHolder problemsHolder = new ProblemsHolder(inspectionManager, file, false); - ProblemDescriptionsProcessor problemDescriptionProcessor = getProblemDescriptionProcessor(toolWrapper, wrappersMap); - tool.checkFile(file, inspectionManager, problemsHolder, GlobalInspectionContextImpl.this, problemDescriptionProcessor); - InspectionToolPresentation toolPresentation = getPresentation(toolWrapper); - LocalDescriptorsUtil.addProblemDescriptors(problemsHolder.getResults(), false, GlobalInspectionContextImpl.this, null, - CONVERT, toolPresentation); + public boolean process(GlobalInspectionToolWrapper toolWrapper) { + GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool)toolWrapper.getTool(); + ProblemsHolder problemsHolder = new ProblemsHolder(inspectionManager, file, false); + ProblemDescriptionsProcessor problemDescriptionProcessor = getProblemDescriptionProcessor(toolWrapper, wrappersMap); + tool.checkFile(file, inspectionManager, problemsHolder, GlobalInspectionContextImpl.this, problemDescriptionProcessor); + InspectionToolPresentation toolPresentation = getPresentation(toolWrapper); + LocalDescriptorsUtil.addProblemDescriptors(problemsHolder.getResults(), false, GlobalInspectionContextImpl.this, null, + CONVERT, toolPresentation); return true; } }); @@ -575,10 +574,10 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp } } - private static List getWrappersFromTools(List localTools, PsiFile file) { - final List lTools = new ArrayList(); + private static List getWrappersFromTools(List localTools, PsiFile file) { + final List lTools = new ArrayList(); for (Tools tool : localTools) { - final LocalInspectionToolWrapper enabledTool = (LocalInspectionToolWrapper)tool.getEnabledTool(file); + final T enabledTool = (T)tool.getEnabledTool(file); if (enabledTool != null) { lTools.add(enabledTool); }