You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-17 07:50:09 +00:00
refactor: make ReuseExistingWindowKey internal for better encapsulation
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
|||||||
internal class VisualStudioCursorInstallation : VisualStudioInstallation
|
internal class VisualStudioCursorInstallation : VisualStudioInstallation
|
||||||
{
|
{
|
||||||
private static readonly IGenerator _generator = new SdkStyleProjectGeneration();
|
private static readonly IGenerator _generator = new SdkStyleProjectGeneration();
|
||||||
private const string ReuseExistingWindowKey = "cursor_reuse_existing_window";
|
internal const string ReuseExistingWindowKey = "cursor_reuse_existing_window";
|
||||||
|
|
||||||
public override bool SupportsAnalyzers
|
public override bool SupportsAnalyzers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,10 +134,10 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
|||||||
|
|
||||||
if (installation is VisualStudioCursorInstallation)
|
if (installation is VisualStudioCursorInstallation)
|
||||||
{
|
{
|
||||||
var reuseWindow = EditorPrefs.GetBool("cursor_reuse_existing_window", false);
|
var reuseWindow = EditorPrefs.GetBool(VisualStudioCursorInstallation.ReuseExistingWindowKey, false);
|
||||||
var newReuseWindow = EditorGUILayout.Toggle(new GUIContent("Reuse existing Cursor window", "When enabled, opens files in an existing Cursor window if found. When disabled, always opens a new window."), reuseWindow);
|
var newReuseWindow = EditorGUILayout.Toggle(new GUIContent("Reuse existing Cursor window", "When enabled, opens files in an existing Cursor window if found. When disabled, always opens a new window."), reuseWindow);
|
||||||
if (newReuseWindow != reuseWindow)
|
if (newReuseWindow != reuseWindow)
|
||||||
EditorPrefs.SetBool("cursor_reuse_existing_window", newReuseWindow);
|
EditorPrefs.SetBool(VisualStudioCursorInstallation.ReuseExistingWindowKey, newReuseWindow);
|
||||||
|
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user