Search in sources :

Example 1 with CommonProblemDescriptorImpl

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

the class UnsupportedFeatures method createIntention.

@NotNull
private static IntentionAction createIntention(@NotNull PsiElement node, @Nullable TextRange range, @NotNull String message, @NotNull LocalQuickFix localQuickFix) {
    final LocalQuickFix[] quickFixes = { localQuickFix };
    final CommonProblemDescriptorImpl descr = new ProblemDescriptorImpl(node, node, message, quickFixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true, range, true);
    return QuickFixWrapper.wrap((ProblemDescriptor) descr, 0);
}
Also used : CommonProblemDescriptorImpl(com.intellij.codeInspection.CommonProblemDescriptorImpl) LocalQuickFix(com.intellij.codeInspection.LocalQuickFix) CommonProblemDescriptorImpl(com.intellij.codeInspection.CommonProblemDescriptorImpl) ProblemDescriptorImpl(com.intellij.codeInspection.ex.ProblemDescriptorImpl) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

CommonProblemDescriptorImpl (com.intellij.codeInspection.CommonProblemDescriptorImpl)1 LocalQuickFix (com.intellij.codeInspection.LocalQuickFix)1 ProblemDescriptorImpl (com.intellij.codeInspection.ex.ProblemDescriptorImpl)1 NotNull (org.jetbrains.annotations.NotNull)1