summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java')
-rw-r--r--plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java
index 1ba34a6235d8..d792a1ae1101 100644
--- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java
+++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspectionVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2013 Dave Griffith, Bas Leijdekkers
+ * Copyright 2003-2014 Dave Griffith, Bas Leijdekkers
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -191,8 +191,13 @@ public abstract class BaseInspectionVisitor extends JavaElementVisitor {
holder.registerProblem(location, description, highlightType, fixes);
}
- protected final void registerErrorAtOffset(@NotNull PsiElement location,
- int offset, int length, Object... infos) {
+ protected final void registerErrorAtOffset(@NotNull PsiElement location, int offset, int length, Object... infos) {
+ registerErrorAtOffset(location, offset, length, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, infos);
+ }
+
+ protected final void registerErrorAtOffset(@NotNull PsiElement location, int offset, int length,
+ ProblemHighlightType highlightType,
+ Object... infos) {
if (location.getTextLength() == 0 || length == 0) {
return;
}
@@ -202,7 +207,7 @@ public abstract class BaseInspectionVisitor extends JavaElementVisitor {
}
final String description = inspection.buildErrorString(infos);
final TextRange range = new TextRange(offset, offset + length);
- holder.registerProblem(location, range, description, fixes);
+ holder.registerProblem(location, description, highlightType, range, fixes);
}
@NotNull