HighlightUsagesHandlerBase (@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiElement target) { ASTNode node = target.getNode(); if (node == null) return null; IElementType type = node.getElementType(); if (!(type instanceof GroovyElementType)) return null; if (type == GroovyTokenTypes.kIMPLEMENTS || type == GroovyTokenTypes.kEXTENDS) { PsiElement parent = target.getParent(); if (!(parent instanceof GrReferenceList)) return null; PsiElement grand = parent.getParent(); if (!(grand instanceof GrTypeDefinition)) return null; return new GrHighlightOverridingMethodsHandler(editor, file, target, (GrTypeDefinition)grand); } else if (type == GroovyTokenTypes.kRETURN || type == GroovyTokenTypes.kTHROW) { return new GrHighlightExitPointHandler(editor, file, target); } return null; }