boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (file instanceof PsiCompiledElement) return false; if (!GroovyFileType.GROOVY_FILE_TYPE.equals(file.getFileType())) return false; PsiClass targetClass = getTargetClass(editor, file); if (targetClass == null) return false; if (targetClass.isInterface()) return false; //? return true; }