[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.
This commit is contained in:
Daniil Ovchinnikov
2017-08-14 16:54:16 +03:00
parent a3f755c9c5
commit b4bd7ca65d
@@ -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;
}
}