From b4bd7ca65d6c0f7e33940119fde3b839a1df1da0 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Mon, 14 Aug 2017 14:37:42 +0300 Subject: [PATCH] [groovy] don't try to get name indentifier of method in another file Given: reference in file A is resolved to method in file B. Before change: file B AST was loaded, in particular all reference files ASTs were loaded. --- .../jetbrains/plugins/groovy/annotator/GrHighlightUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/GrHighlightUtil.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/GrHighlightUtil.java index ae8250f44cc9..7d39605803a9 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/GrHighlightUtil.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/GrHighlightUtil.java @@ -124,9 +124,6 @@ public class GrHighlightUtil { return isStatic ? GroovySyntaxHighlighter.STATIC_PROPERTY_REFERENCE : GroovySyntaxHighlighter.INSTANCE_PROPERTY_REFERENCE; } else if (resolved instanceof PsiMethod) { - - if (isMethodWithLiteralName((PsiMethod)resolved)) return null; //don't highlight method with literal name - if (((PsiMethod)resolved).isConstructor()) { if (refElement != null) { if (refElement.getNode().getElementType() == GroovyTokenTypes.kTHIS || //don't highlight this() or super() @@ -152,6 +149,7 @@ public class GrHighlightUtil { } } else { + if (isMethodWithLiteralName((PsiMethod)resolved)) return null; //don't highlight method with literal name return GroovySyntaxHighlighter.METHOD_DECLARATION; } }