mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Simplify "registerProblem" util methods in CompatibilityVisitor
This commit is contained in:
@@ -147,15 +147,6 @@ public class PyCompatibilityInspection extends PyInspection {
|
||||
myHolder = holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void registerProblem(@Nullable PsiElement node,
|
||||
@NotNull String message,
|
||||
@Nullable LocalQuickFix localQuickFix,
|
||||
boolean asError) {
|
||||
if (node == null) return;
|
||||
registerProblem(node, node.getTextRange(), message, localQuickFix, asError);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerProblem(@NotNull PsiElement element,
|
||||
@NotNull TextRange range,
|
||||
|
||||
@@ -538,22 +538,17 @@ public abstract class CompatibilityVisitor extends PyAnnotator {
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void registerProblem(@Nullable PsiElement node,
|
||||
@NotNull String message,
|
||||
@Nullable LocalQuickFix localQuickFix,
|
||||
boolean asError);
|
||||
|
||||
protected abstract void registerProblem(@NotNull PsiElement node,
|
||||
@NotNull TextRange range,
|
||||
@NotNull String message,
|
||||
@Nullable LocalQuickFix localQuickFix,
|
||||
boolean asError);
|
||||
|
||||
protected void registerProblem(@Nullable PsiElement node, @NotNull String message, @Nullable LocalQuickFix localQuickFix) {
|
||||
registerProblem(node, message, localQuickFix, true);
|
||||
protected void registerProblem(@NotNull PsiElement node, @NotNull String message, @Nullable LocalQuickFix localQuickFix) {
|
||||
registerProblem(node, node.getTextRange(), message, localQuickFix, true);
|
||||
}
|
||||
|
||||
protected void registerProblem(@Nullable PsiElement node, @NotNull String message) {
|
||||
protected void registerProblem(@NotNull PsiElement node, @NotNull String message) {
|
||||
registerProblem(node, message, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,15 +46,6 @@ public class UnsupportedFeatures extends CompatibilityVisitor {
|
||||
setVersionsToProcess(Arrays.asList(LanguageLevel.forElement(node)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerProblem(@Nullable PsiElement node,
|
||||
@NotNull String message,
|
||||
@Nullable LocalQuickFix localQuickFix,
|
||||
boolean asError) {
|
||||
if (node == null) return;
|
||||
registerProblem(node, node.getTextRange(), message, localQuickFix, asError);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerProblem(@NotNull PsiElement node,
|
||||
@NotNull TextRange range,
|
||||
|
||||
Reference in New Issue
Block a user