@Override public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { if (!(file instanceof JetFile)) return; JetKeywordToken modifier = findVisibilityChangeTo((JetFile) file); JetToken[] modifiersThanCanBeReplaced = new JetKeywordToken[] { JetTokens.PUBLIC_KEYWORD, JetTokens.PRIVATE_KEYWORD, JetTokens.PROTECTED_KEYWORD, JetTokens.INTERNAL_KEYWORD }; element.replace( AddModifierFix.addModifier(element, modifier, modifiersThanCanBeReplaced, project, true)); }
@Override public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { annotationClass.replace( AddModifierFix.addModifier(annotationClass, ANNOTATION_KEYWORD, null, project, false)); }