void (@NotNull AnActionEvent e) { super.update(e); VcsLogUi logUI = e.getData(VcsLogDataKeys.VCS_LOG_UI); VcsLogUiProperties properties = e.getData(VcsLogInternalDataKeys.LOG_UI_PROPERTIES); Presentation presentation = e.getPresentation(); presentation.setVisible(BekUtil.isBekEnabled()); presentation.setEnabled(BekUtil.isBekEnabled() && logUI != null); if (properties != null && properties.exists(MainVcsLogUiProperties.BEK_SORT_TYPE)) { String description; if (properties.get(MainVcsLogUiProperties.BEK_SORT_TYPE) == PermanentGraph.SortType.Normal) { String localizedDescription = GraphSortPresentationUtil.getLocalizedDescription(PermanentGraph.SortType.Bek); description = VcsLogBundle.message("vcs.log.action.turn.intellisort.on", StringUtil.toLowerCase(localizedDescription)); } else { String localizedDescription = GraphSortPresentationUtil.getLocalizedDescription(PermanentGraph.SortType.Normal); description = VcsLogBundle.message("vcs.log.action.turn.intellisort.off", StringUtil.toLowerCase(localizedDescription)); } presentation.setDescription(description); } else { //noinspection DialogTitleCapitalization presentation.setDescription(VcsLogBundle.message("vcs.log.action.intellisort.description")); } }