void (@NotNull AnActionEvent e) { DiffRequest request = e.getData(DiffDataKeys.DIFF_REQUEST); boolean isEnabled = request != null && isSupported(request); e.getPresentation().setEnabledAndVisible(isEnabled); }