Skip to content

Commit 8410180

Browse files
committed
Optionally open all workspace files and scan for symbols
1 parent 74c4382 commit 8410180

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PowerShellEditorServices/Services/Symbols/SymbolsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public async Task<IEnumerable<SymbolReference>> GetDefinitionOfSymbolAsync(
341341
return declarations;
342342
}
343343

344-
private async Task ScanWorkspacePSFiles(CancellationToken cancellationToken = default)
344+
internal async Task ScanWorkspacePSFiles(CancellationToken cancellationToken = default)
345345
{
346346
if (_configurationService.CurrentSettings.AnalyzeOpenDocumentsOnly)
347347
{

src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public PsesWorkspaceSymbolsHandler(ILoggerFactory loggerFactory, SymbolsService
3434

3535
public override async Task<Container<SymbolInformation>> Handle(WorkspaceSymbolParams request, CancellationToken cancellationToken)
3636
{
37+
await _symbolsService.ScanWorkspacePSFiles(cancellationToken).ConfigureAwait(false);
3738
List<SymbolInformation> symbols = new();
3839

39-
// TODO: This should (optionally) check all the files, like we do for scanning for references by calling ScanWorkspacePSFiles.
4040
foreach (ScriptFile scriptFile in _workspaceService.GetOpenedFiles())
4141
{
4242
IEnumerable<SymbolReference> foundSymbols = _symbolsService.FindSymbolsInFile(scriptFile);

0 commit comments

Comments
 (0)