void (@NotNull AnActionEvent e) { if (DiffUtil.isFromShortcut(e)) { e.getPresentation().setEnabledAndVisible(true); return; } PrevNextDifferenceIterable iterable = e.getData(DiffDataKeys.PREV_NEXT_DIFFERENCE_ITERABLE); if (iterable != null && iterable.canGoPrev()) { e.getPresentation().setEnabled(true); return; } if (getSettings().isGoToNextFileOnNextDifference() && isNavigationEnabled() && hasPrevChange(true)) { e.getPresentation().setEnabled(true); return; } e.getPresentation().setEnabled(false); }