void (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); PreviewTextModel textModel = editor == null ? null : editor.getUserData(TEXT_MODEL_KEY); e.getPresentation().setEnabledAndVisible(editor != null && textModel != null && !textModel.isDefault()); }