void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(e.getProject() != null); String activeLayout = ToolWindowDefaultLayoutManager.getInstance().getActiveLayoutName(); e.getPresentation().setDescription( ToolWindowDefaultLayoutManager.FACTORY_DEFAULT_LAYOUT_NAME.equals(activeLayout) ? ActionsBundle.message("action.RestoreFactoryDefaultLayout.description") : ActionsBundle.message("action.RestoreDefaultLayout.named.description", activeLayout) ); }