You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-15 06:40:08 +00:00
com.unity.ide.visualstudio@2.0.15
## [2.0.15] - 2022-03-21 Integration: - Improved project generation performance. - Added support for keeping file/folder structure when working with external packages. - Fixed project generation not being refreshed when selecting Visual Studio as the preferred external editor.
This commit is contained in:
@@ -63,6 +63,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
|
||||
internal static bool IsEnabled => CodeEditor.CurrentEditor is VisualStudioEditor && UnityInstallation.IsMainUnityEditorProcess;
|
||||
|
||||
// this one seems legacy and not used anymore
|
||||
// keeping it for now given it is public, so we need a major bump to remove it
|
||||
public void CreateIfDoesntExist()
|
||||
{
|
||||
if (!_generator.HasSolutionBeenGenerated())
|
||||
@@ -260,7 +262,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
return true;
|
||||
|
||||
// We only want to check for cs scripts
|
||||
if (ProjectGeneration.ScriptingLanguageFor(path) != ScriptingLanguage.CSharp)
|
||||
if (ProjectGeneration.ScriptingLanguageForFile(path) != ScriptingLanguage.CSharp)
|
||||
return true;
|
||||
|
||||
// Even on windows, the package manager requires relative path + unix style separators for queries
|
||||
@@ -357,31 +359,14 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
absolutePath = Path.GetFullPath(path);
|
||||
}
|
||||
|
||||
string solution = GetOrGenerateSolutionFile(path);
|
||||
var solution = GetOrGenerateSolutionFile(path);
|
||||
return OpenVisualStudio(CodeEditor.CurrentEditorInstallation, solution, absolutePath, line);
|
||||
}
|
||||
|
||||
private string GetOrGenerateSolutionFile(string path)
|
||||
{
|
||||
var solution = GetSolutionFile(path);
|
||||
if (solution == "")
|
||||
{
|
||||
_generator.Sync();
|
||||
solution = GetSolutionFile(path);
|
||||
}
|
||||
|
||||
return solution;
|
||||
}
|
||||
|
||||
string GetSolutionFile(string path)
|
||||
{
|
||||
var solutionFile = _generator.SolutionFile();
|
||||
if (File.Exists(solutionFile))
|
||||
{
|
||||
return solutionFile;
|
||||
}
|
||||
|
||||
return "";
|
||||
_generator.Sync();
|
||||
return _generator.SolutionFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user