static void AddMenuItems() { HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu), PENDING_CHANGES_MENU_ITEM_PRIORITY, PendingChanges, ValidatePendingChanges); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.AddPlasticMenu), ADD_MENU_ITEM_PRIORITY, Add, ValidateAdd); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.CheckoutPlasticMenu), CHECKOUT_MENU_ITEM_PRIORITY, Checkout, ValidateCheckout); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.CheckinPlasticMenu), CHECKIN_MENU_ITEM_PRIORITY, Checkin, ValidateCheckin); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.UndoPlasticMenu), UNDO_MENU_ITEM_PRIORITY, Undo, ValidateUndo); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.DiffPlasticMenu), GetPlasticShortcut.ForAssetDiff(), DIFF_MENU_ITEM_PRIORITY, Diff, ValidateDiff); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.HistoryPlasticMenu), GetPlasticShortcut.ForHistory(), HISTORY_MENU_ITEM_PRIORITY, History, ValidateHistory); HandleMenuItem.UpdateAllMenus(); }
void BuildComponents() { mOpenSubmenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen)); mOpenMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), GetPlasticShortcut.ForOpen()))); mOpenWithMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpenWith))); mOpenInExplorerMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), PlasticLocalization.GetString(PlasticLocalization.Name.OpenInExplorerMenuItem))); mOpenMetaMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), PlasticLocalization.GetString(PlasticLocalization.Name.OpenMeta))); mOpenMetaWithMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), PlasticLocalization.GetString(PlasticLocalization.Name.OpenMetaWith))); mOpenMetaInExplorerMenuItemContent = new GUIContent( UnityMenuItem.GetText( PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen), PlasticLocalization.GetString(PlasticLocalization.Name.OpenMetaInExplorer))); mDiffMenuItemContent = new GUIContent(string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.DiffMenuItem), GetPlasticShortcut.ForDiff())); mDiffMetaMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.DiffMetaMenuItem)); mUndoChangesMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.PendingChangesMenuItemUndoChanges)); mCheckoutMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.PendingChangesMenuItemCheckout)); mDeleteMenuItemContent = new GUIContent(string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.PendingChangesMenuItemDelete), GetPlasticShortcut.ForDelete())); mViewHistoryMenuItemContent = new GUIContent(string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.ViewHistoryMenuItem), GetPlasticShortcut.ForHistory())); mViewHistoryMetaMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.ViewHistoryMetaMenuItem)); mFilterMenuBuilder.BuildIgnoredSubmenuItem(); mFilterMenuBuilder.BuildHiddenChangesSubmenuItem(); }
void BuildComponents() { mDiffMenuItemContent = new GUIContent( string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.DiffMenuItem), GetPlasticShortcut.ForDiff())); mDiffMetaMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.DiffMetaMenuItem)); mViewHistoryMenuItemContent = new GUIContent( string.Format("{0} {1}", PlasticLocalization.GetString(PlasticLocalization.Name.ViewHistoryMenuItem), GetPlasticShortcut.ForHistory())); mViewHistoryMetaMenuItemContent = new GUIContent( PlasticLocalization.GetString(PlasticLocalization.Name.ViewHistoryMetaMenuItem)); mRevertMenuItemContent = new GUIContent(); mUndeleteMenuItemContent = new GUIContent(); mUndeleteToSpecifiedPathMenuItemContent = new GUIContent(); }
static void AddMenuItems() { // TODO: Try removing this // Somehow first item always disappears. So this is a filler item HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu), PENDING_CHANGES_MENU_ITEM_PRIORITY, PendingChanges, ValidatePendingChanges); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.PendingChangesPlasticMenu), PENDING_CHANGES_MENU_ITEM_PRIORITY, PendingChanges, ValidatePendingChanges); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.AddPlasticMenu), ADD_MENU_ITEM_PRIORITY, Add, ValidateAdd); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.CheckoutPlasticMenu), CHECKOUT_MENU_ITEM_PRIORITY, Checkout, ValidateCheckout); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.CheckinPlasticMenu), CHECKIN_MENU_ITEM_PRIORITY, Checkin, ValidateCheckin); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.UndoPlasticMenu), UNDO_MENU_ITEM_PRIORITY, Undo, ValidateUndo); UpdateFilterMenuItems(); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.DiffPlasticMenu), GetPlasticShortcut.ForAssetDiff(), DIFF_MENU_ITEM_PRIORITY, Diff, ValidateDiff); HandleMenuItem.AddMenuItem( GetPlasticMenuItemName(PlasticLocalization.Name.HistoryPlasticMenu), GetPlasticShortcut.ForHistory(), HISTORY_MENU_ITEM_PRIORITY, History, ValidateHistory); HandleMenuItem.UpdateAllMenus(); }