From d9c065845265c4a755a31bc02c36c50fc4dc2d33 Mon Sep 17 00:00:00 2001 From: "Maxim.Medvedev" Date: Thu, 1 Dec 2011 15:21:35 +0400 Subject: [PATCH] highlight only reference element instead of whole new-expression --- .../org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java index d3fce6278802..c67aec8f8dc0 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/GroovyAnnotator.java @@ -716,7 +716,7 @@ public class GroovyAnnotator extends GroovyElementVisitor implements Annotator { else { final PsiClass outerClass = clazz.getContainingClass(); if (com.intellij.psi.util.PsiUtil.isInnerClass(clazz) && !PsiUtil.hasEnclosingInstanceInScope(outerClass, newExpression, true)) { - Annotation annotation = myHolder.createErrorAnnotation(newExpression, GroovyBundle.message("cannot.reference.nonstatic", clazz.getQualifiedName())); + Annotation annotation = myHolder.createErrorAnnotation(refElement, GroovyBundle.message("cannot.reference.nonstatic", clazz.getQualifiedName())); annotation.setTextAttributes(DefaultHighlighter.UNRESOLVED_ACCESS); } }