void (@NotNull Element element, @NotNull Project project) { Element scopes = element.getChild("scopes"); if (scopes == null) return; initInspectionTools(); for (Element scopeElement : scopes.getChildren(SCOPE)) { String profile = scopeElement.getAttributeValue(PROFILE); InspectionProfileImpl inspectionProfile = profile == null ? null : myProfileManager.getProfile(profile); NamedScope scope = null; if (inspectionProfile != null) { NamedScopesHolder scopesManager = myProfileManager.getScopesManager(); if (scopesManager != null) { scope = scopesManager.getScope(scopeElement.getAttributeValue(NAME)); } } if (scope == null) { continue; } for (InspectionToolWrapper<?, ?> toolWrapper : inspectionProfile.getInspectionTools(null)) { HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName()); try { InspectionToolWrapper<?, ?> toolWrapperCopy = copyToolSettings(toolWrapper); HighlightDisplayLevel errorLevel = inspectionProfile.getErrorLevel(Objects.requireNonNull(key), null, project); getTools(toolWrapper.getShortName(), project) .addTool(scope, toolWrapperCopy, inspectionProfile.isToolEnabled(key), errorLevel); } catch (Exception e) { LOG.error(e); } } } reduceConvertedScopes(); }