use of com.intellij.profile.codeInspection.InspectionProjectProfileManager in project intellij-community by JetBrains.
the class IncompletePropertyInspection method getInstance.
@NotNull
public static IncompletePropertyInspection getInstance(PsiElement element) {
final InspectionProjectProfileManager profileManager = InspectionProjectProfileManager.getInstance(element.getProject());
InspectionProfile inspectionProfile = profileManager.getCurrentProfile();
return (IncompletePropertyInspection) inspectionProfile.getUnwrappedTool(TOOL_KEY, element);
}
use of com.intellij.profile.codeInspection.InspectionProjectProfileManager in project intellij-community by JetBrains.
the class BaseInspection method isInspectionEnabled.
public static boolean isInspectionEnabled(@NonNls String shortName, PsiElement context) {
final InspectionProjectProfileManager profileManager = InspectionProjectProfileManager.getInstance(context.getProject());
final InspectionProfileImpl profile = profileManager.getCurrentProfile();
return profile.isToolEnabled(HighlightDisplayKey.find(shortName), context);
}
Aggregations