highlight @ in annotations

This commit is contained in:
Maxim.Medvedev
2012-02-05 15:55:33 +04:00
parent 01903ef524
commit b6a8d852ba
@@ -1709,7 +1709,8 @@ public class GroovyAnnotator extends GroovyElementVisitor implements Annotator {
PsiElement parent = refElement.getParent();
if (element instanceof PsiClass) {
if (((PsiClass)element).isAnnotationType() && !(parent instanceof GrImportStatement)) {
Annotation annotation = holder.createInfoAnnotation(refElement, null);
final TextRange range = refElement.getTextRange();
Annotation annotation = holder.createInfoAnnotation(new TextRange(range.getStartOffset() - 1, range.getEndOffset()), null);
annotation.setTextAttributes(DefaultHighlighter.ANNOTATION);
GroovyPsiElement context = result.getCurrentFileResolveContext();
if (context instanceof GrImportStatement) {