void (@NotNull final AnActionEvent e) { GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext()); CaptionSelection selection = e.getData(CaptionSelection.DATA_KEY); if (editor == null || selection == null || !editor.ensureEditable()) { return; } actionPerformed(selection); selection.getContainer().revalidate(); editor.refreshAndSave(true); }