void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); Project project = event.getProject(); if (project == null) { presentation.setEnabled(false); return; } presentation.setEnabled(IdeDocumentHistory.getInstance(project).isNavigatePreviousChangeAvailable()); }