From 7554463ae57101b6ec3fe2644686e3e8efad641c Mon Sep 17 00:00:00 2001 From: Alexander Kirillin Date: Wed, 18 Apr 2012 20:21:12 +0400 Subject: [PATCH] OC-3243 --- .../codeInspection/ex/GlobalInspectionContextImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 34c5757bc028..38d061d449d4 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -618,7 +618,8 @@ public class GlobalInspectionContextImpl extends UserDataHolderBase implements G for (Tools tools : globalSimpleTools) { GlobalInspectionToolWrapper toolWrapper = (GlobalInspectionToolWrapper)tools.getTool(); GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool)toolWrapper.getTool(); - tool.inspectionFinished(manager, this, toolWrapper); + GlobalInspectionToolWrapper problemDescriptionProcessor = getProblemDescriptionProcessor(toolWrapper, localTools); + tool.inspectionFinished(manager, this, problemDescriptionProcessor); } } @@ -638,7 +639,11 @@ public class GlobalInspectionContextImpl extends UserDataHolderBase implements G String problemGroup = ((ProblemDescriptor)problemDescriptor).getProblemGroup(); if (problemGroup != null) { - dummyWrappersMap.get(problemGroup).addProblemElement(refEntity, problemDescriptor); + DescriptorProviderInspection dummyWrapper = dummyWrappersMap.get(problemGroup); + + if (dummyWrapper != null) { // Else it's switched off + dummyWrapper.addProblemElement(refEntity, problemDescriptor); + } } else { toolWrapper.addProblemElement(refEntity, commonProblemDescriptors);