void () { SplitIfAction action = new SplitIfAction(); ActionContext context = ActionContext.from(getEditor(), getFile()); assertNotNull(action.getPresentation(context)); ModCommand command = action.perform(context); ApplicationManager.getApplication().runWriteAction( () -> ModCommandExecutor.getInstance().executeInteractively(context, command, getEditor())); }