2022-01-12 10:06:03 +03:00
|
|
|
using JetBrains.Annotations;
|
|
|
|
using Packages.Rider.Editor;
|
2022-01-12 10:39:15 +03:00
|
|
|
using Packages.Rider.Editor.Util;
|
2022-01-12 10:06:03 +03:00
|
|
|
using Unity.CodeEditor;
|
2022-01-12 10:39:15 +03:00
|
|
|
using UnityEditor;
|
2022-01-12 10:06:03 +03:00
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
namespace JetBrains.Rider.Unity.Editor
|
|
|
|
{
|
2022-01-12 10:39:15 +03:00
|
|
|
/// <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
|
|
|
|
{
|
2022-01-12 10:39:15 +03:00
|
|
|
/// <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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|