use of com.perl5.lang.perl.idea.quickfixes.PerlUseVarsQuickFix in project Perl5-IDEA by Camelcade.
the class PerlUseVarsInspection method buildVisitor.
@NotNull
@Override
public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
return new PerlVisitor() {
@Override
public void visitUseStatement(@NotNull PsiPerlUseStatement o) {
if (PACKAGE_VARS.equals(o.getPackageName())) {
PerlUseVarsQuickFix quickFix = new PerlUseVarsQuickFix(o);
holder.registerProblem(o, quickFix.isRemoval() ? PerlBundle.message("perl.redundant.code") : PerlBundle.message("perl.inspection.use.vars"), quickFix.isRemoval() ? ProblemHighlightType.LIKE_UNUSED_SYMBOL : ProblemHighlightType.GENERIC_ERROR_OR_WARNING, quickFix);
}
}
};
}
Aggregations