void (@NotNull AnActionEvent e) { super.update(e); Project project = e.getData(CommonDataKeys.PROJECT); VcsLogUi ui = e.getData(VcsLogDataKeys.VCS_LOG_UI); if (project == null || ui == null) { e.getPresentation().setEnabledAndVisible(false); } else { Set<VirtualFile> visibleRoots = VcsLogUtil.getVisibleRoots(ui); Set<VirtualFile> allRoots = visibleRoots; if (allRoots.isEmpty()) { allRoots = ContainerUtil.map2Set(ProjectLevelVcsManager.getInstance(project).getAllVcsRoots(), VcsRoot::getPath); } e.getPresentation().setEnabled(hasGitRoots(project, visibleRoots)); e.getPresentation().setVisible(hasGitRoots(project, allRoots)); } }