PO/Library/PackageCache/com.unity.ide.rider@2.0.7/Rider/Editor/Util/RiderMenu.cs

32 lines
878 B
C#
Raw Normal View History

2022-01-12 10:06:03 +03:00
using JetBrains.Annotations;
using Packages.Rider.Editor;
using Packages.Rider.Editor.Util;
2022-01-12 10:06:03 +03:00
using Unity.CodeEditor;
using UnityEditor;
2022-01-12 10:06:03 +03:00
// ReSharper disable once CheckNamespace
namespace JetBrains.Rider.Unity.Editor
{
/// <summary>
/// Is called via commandline from Rider Notification after checking out from source control.
/// </summary>
[UsedImplicitly]
2022-01-12 10:06:03 +03:00
public static class RiderMenu
{
/// <summary>
/// Is called via commandline from Rider Notification after checking out from source control.
/// </summary>
2022-01-12 10:06:03 +03:00
[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();
}
}
}
}