RiderMenu.cs 878 B

1234567891011121314151617181920212223242526272829303132
  1. using JetBrains.Annotations;
  2. using Packages.Rider.Editor;
  3. using Packages.Rider.Editor.Util;
  4. using Unity.CodeEditor;
  5. using UnityEditor;
  6. // ReSharper disable once CheckNamespace
  7. namespace JetBrains.Rider.Unity.Editor
  8. {
  9. /// <summary>
  10. /// Is called via commandline from Rider Notification after checking out from source control.
  11. /// </summary>
  12. [UsedImplicitly]
  13. public static class RiderMenu
  14. {
  15. /// <summary>
  16. /// Is called via commandline from Rider Notification after checking out from source control.
  17. /// </summary>
  18. [UsedImplicitly]
  19. public static void MenuOpenProject()
  20. {
  21. if (RiderScriptEditor.IsRiderInstallation(RiderScriptEditor.CurrentEditor))
  22. {
  23. // Force the project files to be sync
  24. CodeEditor.CurrentEditor.SyncAll();
  25. // Load Project
  26. CodeEditor.CurrentEditor.OpenProject();
  27. }
  28. }
  29. }
  30. }