private string GetShortcut(IWorkflow <TActionGroup> workflow) { foreach (var actionId in new[] { workflow.ActionId, workflow.ShortActionId }) { if (string.IsNullOrEmpty(actionId)) { continue; } var action = actionManager.TryGetAction(actionId) as IExecutableAction; if (action == null) { continue; } var shortcutText = shortcutManager.GetShortcutString(action); if (!string.IsNullOrEmpty(shortcutText)) { return(string.Format(" ({0})", shortcutText)); } } return(string.Empty); }