void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setEnabledAndVisible(!isAutoScrollFromSourceEnabled(project)); }