From fd0fb414e2f19541356ca71cd54a9c475ad84aa0 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Thu, 4 Jun 2020 14:40:48 -0700 Subject: [PATCH] Use From instead of FromFileSystem --- .../Services/CodeLens/ReferencesCodeLensProvider.cs | 2 +- .../Services/TextDocument/Handlers/DefinitionHandler.cs | 2 +- .../Services/TextDocument/Handlers/DocumentSymbolHandler.cs | 2 +- .../Services/TextDocument/Handlers/ReferencesHandler.cs | 2 +- .../Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PowerShellEditorServices/Services/CodeLens/ReferencesCodeLensProvider.cs b/src/PowerShellEditorServices/Services/CodeLens/ReferencesCodeLensProvider.cs index 82ae08b1a..50bac22ad 100644 --- a/src/PowerShellEditorServices/Services/CodeLens/ReferencesCodeLensProvider.cs +++ b/src/PowerShellEditorServices/Services/CodeLens/ReferencesCodeLensProvider.cs @@ -115,7 +115,7 @@ public CodeLens ResolveCodeLens(CodeLens codeLens, ScriptFile scriptFile) acc.Add(new Location { - Uri = DocumentUri.FromFileSystemPath(foundReference.FilePath), + Uri = DocumentUri.From(foundReference.FilePath), Range = foundReference.ScriptRegion.ToRange() }); } diff --git a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DefinitionHandler.cs b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DefinitionHandler.cs index 25c384620..29d519e12 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DefinitionHandler.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DefinitionHandler.cs @@ -67,7 +67,7 @@ public async Task Handle(DefinitionParams request, Canc new LocationOrLocationLink( new Location { - Uri = DocumentUri.FromFileSystemPath(foundDefinition.FilePath), + Uri = DocumentUri.From(foundDefinition.FilePath), Range = GetRangeFromScriptRegion(foundDefinition.ScriptRegion) })); } diff --git a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs index bbf5d3109..a62985be5 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentSymbolHandler.cs @@ -75,7 +75,7 @@ public Task Handle(DocumentSymbolPar Kind = GetSymbolKind(r.SymbolType), Location = new Location { - Uri = DocumentUri.FromFileSystemPath(r.FilePath), + Uri = DocumentUri.From(r.FilePath), Range = GetRangeFromScriptRegion(r.ScriptRegion) }, Name = GetDecoratedSymbolName(r) diff --git a/src/PowerShellEditorServices/Services/TextDocument/Handlers/ReferencesHandler.cs b/src/PowerShellEditorServices/Services/TextDocument/Handlers/ReferencesHandler.cs index 18b7b34ca..2801a4d86 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/Handlers/ReferencesHandler.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/Handlers/ReferencesHandler.cs @@ -64,7 +64,7 @@ public Task Handle(ReferenceParams request, CancellationToken { locations.Add(new Location { - Uri = DocumentUri.FromFileSystemPath(foundReference.FilePath), + Uri = DocumentUri.From(foundReference.FilePath), Range = GetRangeFromScriptRegion(foundReference.ScriptRegion) }); } diff --git a/src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs b/src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs index 642a13dc4..6c972d4e5 100644 --- a/src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs +++ b/src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs @@ -59,7 +59,7 @@ public Task> Handle(WorkspaceSymbolParams request, var location = new Location { - Uri = DocumentUri.FromFileSystemPath(foundOccurrence.FilePath), + Uri = DocumentUri.From(foundOccurrence.FilePath), Range = GetRangeFromScriptRegion(foundOccurrence.ScriptRegion) };