Search in sources :

Example 1 with LocalQuickFixAsIntentionAdapter

use of com.intellij.codeInspection.LocalQuickFixAsIntentionAdapter in project intellij-community by JetBrains.

the class GrAccessibilityChecker method registerFixes.

private void registerFixes(GrReferenceElement ref, GroovyResolveResult result, HighlightInfo info) {
    PsiElement element = result.getElement();
    assert element != null;
    ProblemDescriptor descriptor = InspectionManager.getInstance(ref.getProject()).createProblemDescriptor(element, element, "", HighlightInfo.convertSeverityToProblemHighlight(info.getSeverity()), true, LocalQuickFix.EMPTY_ARRAY);
    for (GroovyFix fix : buildFixes(ref, result)) {
        QuickFixAction.registerQuickFixAction(info, new LocalQuickFixAsIntentionAdapter(fix, descriptor), myDisplayKey);
    }
}
Also used : GroovyFix(org.jetbrains.plugins.groovy.codeInspection.GroovyFix) ProblemDescriptor(com.intellij.codeInspection.ProblemDescriptor) LocalQuickFixAsIntentionAdapter(com.intellij.codeInspection.LocalQuickFixAsIntentionAdapter)

Aggregations

LocalQuickFixAsIntentionAdapter (com.intellij.codeInspection.LocalQuickFixAsIntentionAdapter)1 ProblemDescriptor (com.intellij.codeInspection.ProblemDescriptor)1 GroovyFix (org.jetbrains.plugins.groovy.codeInspection.GroovyFix)1