void (@NotNull AnActionEvent e) { VcsPushUi dialog = e.getData(VcsPushUi.VCS_PUSH_DIALOG); if (dialog == null || e.getProject() == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setVisible(true); boolean enabled = isEnabled(dialog); e.getPresentation().setEnabled(enabled); e.getPresentation().setText(getText(dialog, enabled)); e.getPresentation().setDescription(getDescription(dialog, enabled)); }