void (@NotNull AnActionEvent event) { CopyAction.updateWithProvider(event, event.getData(PlatformDataKeys.CUT_PROVIDER), true, provider -> { boolean isEditorPopup = event.getPlace().equals(ActionPlaces.EDITOR_POPUP); event.getPresentation().setEnabled(provider.isCutEnabled(event.getDataContext())); event.getPresentation().setVisible(!isEditorPopup || provider.isCutVisible(event.getDataContext())); }); }