void (@NotNull AnActionEvent e) { RichCopySettings settings = RichCopySettings.getInstance(); boolean savedValue = settings.isEnabled(); try { settings.setEnabled(true); ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_COPY).actionPerformed(e); } finally { settings.setEnabled(savedValue); } }