File tree 4 files changed +14
-5
lines changed
src/PowerShellEditorServices
4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) Microsoft Corporation.
1
+ // Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT License.
3
3
4
4
using System ;
@@ -89,6 +89,8 @@ public async Task StartAsync()
89
89
{
90
90
// Start the host if not already started, and enable debug mode (required
91
91
// for remote debugging).
92
+ //
93
+ // TODO: We might need to fill in HostStartOptions here.
92
94
_startedPses = ! await _psesHost . TryStartAsync ( new HostStartOptions ( ) , cancellationToken ) . ConfigureAwait ( false ) ;
93
95
_psesHost . DebugContext . EnableDebugMode ( ) ;
94
96
Original file line number Diff line number Diff line change @@ -154,9 +154,9 @@ public async Task<CodeLens> ResolveCodeLens(
154
154
Title = GetReferenceCountHeader ( referenceLocations . Length ) ,
155
155
Arguments = JArray . FromObject ( new object [ ]
156
156
{
157
- scriptFile . DocumentUri ,
158
- codeLens . Range . Start ,
159
- referenceLocations
157
+ scriptFile . DocumentUri ,
158
+ codeLens . Range . Start ,
159
+ referenceLocations
160
160
} ,
161
161
LspSerializer . Instance . JsonSerializer )
162
162
}
Original file line number Diff line number Diff line change 5
5
using System . Collections . Generic ;
6
6
using System . Threading ;
7
7
using System . Threading . Tasks ;
8
+ using Newtonsoft . Json . Linq ;
8
9
using Microsoft . Extensions . Logging ;
9
10
using Microsoft . PowerShell . EditorServices . Services ;
10
11
using Microsoft . PowerShell . EditorServices . Services . TextDocument ;
11
12
using Microsoft . PowerShell . EditorServices . Utility ;
12
13
using OmniSharp . Extensions . LanguageServer . Protocol . Client . Capabilities ;
13
14
using OmniSharp . Extensions . LanguageServer . Protocol . Document ;
14
15
using OmniSharp . Extensions . LanguageServer . Protocol . Models ;
16
+ using OmniSharp . Extensions . LanguageServer . Protocol . Serialization ;
15
17
16
18
namespace Microsoft . PowerShell . EditorServices . Handlers
17
19
{
@@ -131,7 +133,11 @@ public override async Task<CommandOrCodeActionContainer> Handle(CodeActionParams
131
133
{
132
134
Title = title ,
133
135
Name = "PowerShell.ShowCodeActionDocumentation" ,
134
- Arguments = Newtonsoft . Json . Linq . JArray . FromObject ( new [ ] { diagnostic . Code ? . String } )
136
+ Arguments = JArray . FromObject ( new object [ ]
137
+ {
138
+ diagnostic . Code ? . String
139
+ } ,
140
+ LspSerializer . Instance . JsonSerializer )
135
141
}
136
142
} ) ;
137
143
}
Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ internal static bool IsPathInMemory(string filePath)
506
506
507
507
internal string ResolveRelativeScriptPath ( string baseFilePath , string relativePath )
508
508
{
509
+ // TODO: Sometimes the `baseFilePath` (even when its `WorkspacePath`) is null.
509
510
string combinedPath = null ;
510
511
Exception resolveException = null ;
511
512
You can’t perform that action at this time.
0 commit comments