refactor: make ReuseExistingWindowKey internal for better encapsulation

This commit is contained in:
boxqkrtm
2025-11-02 14:31:29 +09:00
parent c14987c13b
commit 22d40e0e16
2 changed files with 3 additions and 3 deletions

View File

@@ -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
{ {

View File

@@ -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();
} }