Search in sources :

Example 6 with InspectionProjectProfileManager

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);
}
Also used : InspectionProfile(com.intellij.codeInspection.InspectionProfile) InspectionProjectProfileManager(com.intellij.profile.codeInspection.InspectionProjectProfileManager) NotNull(org.jetbrains.annotations.NotNull)

Example 7 with InspectionProjectProfileManager

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);
}
Also used : InspectionProfileImpl(com.intellij.codeInspection.ex.InspectionProfileImpl) InspectionProjectProfileManager(com.intellij.profile.codeInspection.InspectionProjectProfileManager)

Aggregations

InspectionProjectProfileManager (com.intellij.profile.codeInspection.InspectionProjectProfileManager)7 InspectionProfile (com.intellij.codeInspection.InspectionProfile)2 HighlightDisplayKey (com.intellij.codeInsight.daemon.HighlightDisplayKey)1 SeverityRegistrar (com.intellij.codeInsight.daemon.impl.SeverityRegistrar)1 InspectionProfileImpl (com.intellij.codeInspection.ex.InspectionProfileImpl)1 Annotation (com.intellij.lang.annotation.Annotation)1 HighlightSeverity (com.intellij.lang.annotation.HighlightSeverity)1 Document (com.intellij.openapi.editor.Document)1 EditorColorsScheme (com.intellij.openapi.editor.colors.EditorColorsScheme)1 TextAttributes (com.intellij.openapi.editor.markup.TextAttributes)1 PsiElement (com.intellij.psi.PsiElement)1 BaseActionFix (com.scss.annotator.BaseActionFix)1 ScssLintSettingsPage (com.scss.settings.ScssLintSettingsPage)1 Lint (com.scss.utils.scssLint.Lint)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1