Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ public Task<Unit> Handle(DidChangeTextDocumentParams notification, CancellationT
#pragma warning disable CS4014
// Kick off script diagnostics without blocking the response
// TODO: Get all recently edited files in the workspace
_analysisService.RunScriptDiagnosticsAsync(new ScriptFile[] { changedFile });
if (_analysisService != null)
{
_analysisService.RunScriptDiagnosticsAsync(new ScriptFile[] { changedFile });
}
#pragma warning restore CS4014
return Unit.Task;
}
Expand Down Expand Up @@ -94,7 +97,10 @@ public Task<Unit> Handle(DidOpenTextDocumentParams notification, CancellationTok
#pragma warning disable CS4014
// Kick off script diagnostics without blocking the response
// TODO: Get all recently edited files in the workspace
_analysisService.RunScriptDiagnosticsAsync(new ScriptFile[] { openedFile });
if (_analysisService != null)
{
_analysisService.RunScriptDiagnosticsAsync(new ScriptFile[] { openedFile });
}
#pragma warning restore CS4014

_logger.LogTrace("Finished opening document.");
Expand All @@ -117,7 +123,10 @@ public Task<Unit> Handle(DidCloseTextDocumentParams notification, CancellationTo
if (fileToClose != null)
{
_workspaceService.CloseFile(fileToClose);
_analysisService.ClearMarkers(fileToClose);
if (_analysisService != null)
{
_analysisService.ClearMarkers(fileToClose);
}
}

_logger.LogTrace("Finished closing document.");
Expand Down