summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs
blob: 1909342e221038ee203d16beff05910588c32d92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using JetBrains.Annotations;
using Packages.Rider.Editor;
using Unity.CodeEditor;

// Is called via commandline from Rider Notification after checking out from source control.

// ReSharper disable once CheckNamespace 
namespace JetBrains.Rider.Unity.Editor
{
  public static class RiderMenu
  {
    [UsedImplicitly]
    public static void MenuOpenProject()
    {
      if (RiderScriptEditor.IsRiderInstallation(RiderScriptEditor.CurrentEditor))
      {
        // Force the project files to be sync
        CodeEditor.CurrentEditor.SyncAll();

        // Load Project
        CodeEditor.CurrentEditor.OpenProject();
      }
    }
  }
}