Added "unused value analysis"

This commit is contained in:
svtk
2011-11-24 15:58:25 +04:00
parent 4bf3a61621
commit 97f377b529
6 changed files with 96 additions and 4 deletions
@@ -88,6 +88,9 @@ public class JetPsiChecker implements Annotator {
}
else if (diagnostic.getSeverity() == Severity.WARNING) {
annotation = holder.createWarningAnnotation(diagnostic.getFactory().getTextRange(diagnostic), getMessage(diagnostic));
if (diagnostic.getFactory() == Errors.UNUSED_VARIABLE) {
annotation.setHighlightType(ProblemHighlightType.LIKE_UNUSED_SYMBOL);
}
}
if (annotation != null) {
if (diagnostic instanceof DiagnosticWithPsiElementImpl && diagnostic.getFactory() instanceof PsiElementOnlyDiagnosticFactory) {