IntentionPreviewInfo (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { final List<PsiClass> classes = getTargetClasses(); if (classes.size() == 0) { return IntentionPreviewInfo.EMPTY; } Data data = generateMethod(classes.get(0), true); return new IntentionPreviewInfo.CustomDiff(GroovyFileType.GROOVY_FILE_TYPE, "", data.method.getText()); }