HighlightDisplayLevel (LocalInspectionTool inspectionTool, InspectionProfile inspectionProfile, PsiElement file) { HighlightDisplayKey key = HighlightDisplayKey.find(inspectionTool.getShortName()); return inspectionProfile.isToolEnabled(key, file) ? inspectionProfile.getErrorLevel(key, file) : HighlightDisplayLevel.DO_NOT_SHOW; }