boolean (@Nullable PsiElement element, @NotNull Editor editor, @NotNull PsiFile file) { if (!editor.getSettings().isVariableInplaceRenameEnabled()) return false; return element instanceof GrMethod && file instanceof GroovyFile; }