PlasticMenuItem.cs 720 B

1234567891011121314151617181920212223242526272829303132
  1. using Unity.PlasticSCM.Editor.UI;
  2. namespace Unity.PlasticSCM.Editor
  3. {
  4. internal static class PlasticMenuItem
  5. {
  6. internal static void Add()
  7. {
  8. HandleMenuItem.AddMenuItem(
  9. MENU_ITEM_NAME,
  10. MENU_ITEM_PRIORITY,
  11. ShowPanel,
  12. ValidateMenu);
  13. HandleMenuItem.UpdateAllMenus();
  14. }
  15. static bool ValidateMenu()
  16. {
  17. return !CollabPlugin.IsEnabled();
  18. }
  19. static void ShowPanel()
  20. {
  21. ShowWindow.Plastic();
  22. }
  23. const string MENU_ITEM_NAME = "Window/" + UnityConstants.PLASTIC_WINDOW_TITLE;
  24. const int MENU_ITEM_PRIORITY = 1000;
  25. }
  26. }