void (@NotNull AnActionEvent e) { T scheme = getSchemesPanel().getSelectedScheme(); if (scheme == null) { e.getPresentation().setEnabledAndVisible(false); return; } final String text = getDescription(scheme) == null ? IdeBundle.message("action.DescriptionAwareSchemeActions.add.description.text") : IdeBundle.message("action.DescriptionAwareSchemeActions.edit.description.text"); e.getPresentation().setEnabledAndVisible(true); e.getPresentation().setText(text); }