void (@NotNull final AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); Presentation presentation = e.getPresentation(); if (project == null || project.isDisposed()) { presentation.setEnabledAndVisible(false); return; } Collection<ShelvedChangeList> deletedLists = notNullize(e.getData(ShelvedChangesViewManager.SHELVED_DELETED_CHANGELIST_KEY)); presentation.setText(VcsBundle.messagePointer("vcs.shelf.action.restore.text")); presentation .setDescription(VcsBundle.messagePointer("vcs.shelf.action.restore.description", deletedLists.size())); presentation.setEnabled(!isEmpty(deletedLists)); }