void (@NotNull AnActionEvent e) { super.update(e); Project project = e.getProject(); Presentation presentation = e.getPresentation(); if (project != null && !GitUtil.getRepositoriesInState(project, Repository.State.MERGING).isEmpty()) { presentation.setEnabledAndVisible(false); } else if (project != null && GitUtil.getRepositoriesInState(project, Repository.State.NORMAL).isEmpty()) { presentation.setEnabled(false); presentation.setVisible(true); } else { presentation.setEnabledAndVisible(true); } }