@@ -86,7 +86,7 @@ internal static string GetUniqueIdFromDiagnostic(Diagnostic diagnostic)
86
86
87
87
private readonly ConfigurationService _configurationService ;
88
88
89
- private readonly WorkspaceService _workplaceService ;
89
+ private readonly WorkspaceService _workspaceService ;
90
90
91
91
private readonly int _analysisDelayMillis ;
92
92
@@ -115,7 +115,7 @@ public AnalysisService(
115
115
_logger = loggerFactory . CreateLogger < AnalysisService > ( ) ;
116
116
_languageServer = languageServer ;
117
117
_configurationService = configurationService ;
118
- _workplaceService = workspaceService ;
118
+ _workspaceService = workspaceService ;
119
119
_analysisDelayMillis = 750 ;
120
120
_mostRecentCorrectionsByFile = new ConcurrentDictionary < ScriptFile , CorrectionTableEntry > ( ) ;
121
121
_analysisEngineLazy = new Lazy < PssaCmdletAnalysisEngine > ( InstantiateAnalysisEngine ) ;
@@ -223,9 +223,10 @@ public async Task<string> GetCommentHelpText(string functionText, string helpLoc
223
223
/// </summary>
224
224
/// <param name="documentUri">The URI string of the file to get code actions for.</param>
225
225
/// <returns>A threadsafe readonly dictionary of the code actions of the particular file.</returns>
226
- public async Task < IReadOnlyDictionary < string , MarkerCorrection > > GetMostRecentCodeActionsForFileAsync ( ScriptFile scriptFile )
226
+ public async Task < IReadOnlyDictionary < string , MarkerCorrection > > GetMostRecentCodeActionsForFileAsync ( DocumentUri uri )
227
227
{
228
- if ( ! _mostRecentCorrectionsByFile . TryGetValue ( scriptFile , out CorrectionTableEntry corrections ) )
228
+ if ( ! _workspaceService . TryGetFile ( uri , out ScriptFile file )
229
+ || ! _mostRecentCorrectionsByFile . TryGetValue ( file , out CorrectionTableEntry corrections ) )
229
230
{
230
231
return null ;
231
232
}
@@ -334,7 +335,7 @@ private bool TryFindSettingsFile(out string settingsFilePath)
334
335
return false ;
335
336
}
336
337
337
- settingsFilePath = _workplaceService . ResolveWorkspacePath ( configuredPath ) ;
338
+ settingsFilePath = _workspaceService . ResolveWorkspacePath ( configuredPath ) ;
338
339
339
340
if ( settingsFilePath == null
340
341
|| ! File . Exists ( settingsFilePath ) )
@@ -349,7 +350,7 @@ private bool TryFindSettingsFile(out string settingsFilePath)
349
350
350
351
private void ClearOpenFileMarkers ( )
351
352
{
352
- foreach ( ScriptFile file in _workplaceService . GetOpenedFiles ( ) )
353
+ foreach ( ScriptFile file in _workspaceService . GetOpenedFiles ( ) )
353
354
{
354
355
ClearMarkers ( file ) ;
355
356
}
0 commit comments