private void reportOneTagProblem( final XmlTag tag, final String name, final String localizedMessage, final IntentionAction basicIntention, final HighlightDisplayKey key, final XmlEntitiesInspection inspection, final int type) { boolean htmlTag = false; if (tag instanceof HtmlTag) { htmlTag = true; if (isAdditionallyDeclared(inspection.getAdditionalEntries(type), name)) return; } final InspectionProfile profile = InspectionProjectProfileManager.getInstance(tag.getProject()).getInspectionProfile(); final IntentionAction intentionAction = inspection.getIntentionAction(name, type); if (htmlTag && profile.isToolEnabled(key, tag)) { addElementsForTagWithManyQuickFixes( tag, localizedMessage, isInjectedHtmlTagForWhichNoProblemsReporting((HtmlTag) tag) ? HighlightInfoType.INFORMATION : SeverityRegistrar.getInstance(tag.getProject()) .getHighlightInfoTypeBySeverity(profile.getErrorLevel(key, tag).getSeverity()), intentionAction, basicIntention); } else if (!htmlTag) { addElementsForTag(tag, localizedMessage, HighlightInfoType.ERROR, basicIntention); } }
private static HighlightDisplayLevel getHighlightDisplayLevel( final LocalInspectionTool inspectionTool, final InspectionProfile inspectionProfile, PsiElement file) { final HighlightDisplayKey key = HighlightDisplayKey.find(inspectionTool.getShortName()); return inspectionProfile.isToolEnabled(key, file) ? inspectionProfile.getErrorLevel(key, file) : HighlightDisplayLevel.DO_NOT_SHOW; }
@Nullable @Override public String getCustomizedTailText() { return myProfile.isToolEnabled(myKey) ? null : "Disabled"; }
private static boolean isInspectionEnabled(PsiFile file, Project project) { final InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile(); final HighlightDisplayKey unusedDefKey = HighlightDisplayKey.find(SHORT_NAME); return profile.isToolEnabled(unusedDefKey, file); }