void (@NotNull Project project, boolean add) { final InspectionProfileImpl profile = InspectionProjectProfileManager.getInstance(project).getCurrentProfile(); final InspectionToolWrapper<?, ?> tool = profile.getInspectionTool(myShortName, project); if (tool == null) { return; } if (add) { final NamedScope namedScope = NamedScopesHolder.getScope(project, "Tests"); final HighlightDisplayKey key = HighlightDisplayKey.find(myShortName); final HighlightDisplayLevel level = profile.getErrorLevel(key, namedScope, project); profile.addScope(tool, namedScope, level, false, project); } else { profile.removeScope(myShortName, "Tests", project); } profile.scopesChanged(); }