void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); Change[] changes = e.getData(VcsDataKeys.SELECTED_CHANGES); boolean isModalContext = e.getData(PlatformCoreDataKeys.IS_MODAL_CONTEXT) == Boolean.TRUE; boolean isEnabled = project != null && changes != null && !isModalContext && !CommittedChangesBrowserUseCase.IN_AIR.equals(e.getData(CommittedChangesBrowserUseCase.DATA_KEY)) && hasValidChanges(changes); e.getPresentation().setEnabled(isEnabled); }