private boolean isToolEnabled(@NotNull HighlightDisplayKey displayKey) {
    if (!(myFile instanceof PsiJavaFile)) {
      return false;
    }
    InspectionProfile profile = getCurrentProfile(myFile);
    return profile.isToolEnabled(displayKey, myFile) &&
           HighlightingLevelManager.getInstance(myProject).shouldInspect(myFile) &&
           !HighlightingLevelManager.getInstance(myProject).runEssentialHighlightingOnly(myFile);
  }
private boolean isToolEnabled(@NotNull HighlightDisplayKey displayKey)