Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating class symbol support #16

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
3938982
Bump Microsoft.PowerShell.SDK from 7.3.1 to 7.3.2 (#1986)
dependabot[bot] Jan 24, 2023
7270bed
add symbols for classes
fflaten Aug 13, 2022
69a66bb
remove code used for supporting PSv3 and v4
fflaten Aug 13, 2022
e3845e8
support hover
fflaten Aug 14, 2022
b1187b9
add type reference symboltype
fflaten Aug 16, 2022
7cf22f0
support references and definitions
fflaten Aug 16, 2022
13adfc3
add codelens for class and enum
fflaten Aug 16, 2022
f2be365
skip function ast visit for FunctionMemberAst
fflaten Aug 16, 2022
1d1b5cc
drop reference-support for ConfigurationDefinition
fflaten Aug 17, 2022
50e8a6c
update document symbols test
fflaten Aug 17, 2022
4c3a4ab
refactor and cleanup
fflaten Aug 17, 2022
ad58bcd
fix Contains extension method for same line extent
fflaten Aug 20, 2022
12b1366
add EnumMember, signature and fix detection
fflaten Aug 20, 2022
884fecb
update symbols test with name position
fflaten Aug 21, 2022
109dbb0
check type for property and function members
fflaten Aug 21, 2022
e776984
add symbolsservice tests
fflaten Aug 25, 2022
4be7724
add codelens tests
fflaten Aug 25, 2022
bca3de0
add symbol tests using newline after keyword
fflaten Aug 25, 2022
da2ad17
fix DSC symbol test
fflaten Aug 25, 2022
98fbfbd
Minor clean-ups
andyleejordan Jan 7, 2023
3eebb45
Remove deprecated (and confusing) `DocumentSymbolService.cs` file
andyleejordan Jan 11, 2023
6469411
Rename overloaded method to `ScanForReferencesOfSymbol`
andyleejordan Jan 11, 2023
cf79fd0
Migrate `FindReferencesVisitor` to `ReferenceTable.ReferenceVisitor`
andyleejordan Jan 11, 2023
a335897
Deduplicate `GetSymbolKind`, `GetDecoratedSymbolName`, and `GetRangeF…
andyleejordan Jan 11, 2023
fe3a37e
Move reference sorting to unit tests
andyleejordan Jan 11, 2023
b17059d
More simplification and dead code elimination
andyleejordan Jan 12, 2023
3a3059f
Track declarations on `SymbolType` so we can use `ReferenceTable` more
andyleejordan Jan 12, 2023
c67f9ee
Integrate `FindSymbolsVisitor` into `ReferenceTable`
andyleejordan Jan 12, 2023
db48839
Actually fix sorting in symbols tests
andyleejordan Jan 12, 2023
fd95218
Make `DocumentSymbolHandler` more readable
andyleejordan Jan 12, 2023
07e566d
Fix outline view (filter out `EmptyScriptExtent`)
andyleejordan Jan 13, 2023
85694a3
Fix typo
andyleejordan Jan 20, 2023
5776d20
Replace `FindDeclarationVisitor`
andyleejordan Jan 20, 2023
63b2143
Remove notion of `ReferencedFiles`
andyleejordan Jan 23, 2023
cd8dd7f
Break the soon-to-be-only visitor out
andyleejordan Jan 24, 2023
6652213
Remove `FindCommandVisitor`, `FindSymbolVisitor` and `FindDotSourcedV…
andyleejordan Jan 24, 2023
9a857ea
Replace `VisitCommandParameter` with `VisitParameter`
andyleejordan Jan 24, 2023
e5cf5bd
Mark Pester symbols as declarations
andyleejordan Jan 24, 2023
8c2c9c4
Clean up `SymbolReference` constructors
andyleejordan Jan 24, 2023
cee7033
Fix file names for visitors
andyleejordan Jan 24, 2023
6b093da
Clean up some `IEnumerables`
andyleejordan Jan 25, 2023
57c563b
Add `DisplayName` to clean up outline
andyleejordan Jan 25, 2023
74c4382
Exclude parameters from workplace symbols
andyleejordan Jan 25, 2023
8410180
Optionally open all workspace files and scan for symbols
andyleejordan Jan 25, 2023
c2169ed
Use `NameRegion` for definition, workplace jump and hover
andyleejordan Jan 25, 2023
f1fc140
Fix jump to definition from outline
andyleejordan Jan 25, 2023
7471401
Improve function's display strings
andyleejordan Jan 25, 2023
494b0d9
Filter symbol references to type matches
andyleejordan Jan 26, 2023
ec8cf7b
Short-circuit find-definition when given definition
andyleejordan Jan 26, 2023
43baed3
Decorate more type names
andyleejordan Jan 26, 2023
09fc5d0
Include parameter type constraints as symbols
andyleejordan Jan 26, 2023
c8a3bb3
Ignore some warnings
andyleejordan Jan 26, 2023
0f1aa19
Fix parameter hints tests (but the whole feature needs work)
andyleejordan Jan 27, 2023
c8abc70
Fix find function definition tests
andyleejordan Jan 27, 2023
2592af9
Fix find variable and function references tests
andyleejordan Jan 27, 2023
e2d4e25
Fix `FindsOccurrencesOnParameter` test
andyleejordan Jan 27, 2023
bd76db3
Fix `FindsReferencesOnCommandWithAlias` test
andyleejordan Jan 27, 2023
04345dd
Fix a bunch of class symbol tests
andyleejordan Jan 27, 2023
2729e83
Fix `FindsPropertyDefinition` test
andyleejordan Jan 27, 2023
b634dfa
Fix property symbols tests
andyleejordan Jan 27, 2023
e990670
Fix `ScriptRegion.ContainsPosition`
andyleejordan Jan 27, 2023
e407453
Fix display string for function definitions
andyleejordan Jan 27, 2023
2f93517
Fix find enum member tests
andyleejordan Jan 27, 2023
fe29524
Add symbol type equivalencies test
andyleejordan Jan 27, 2023
f69694c
Remove deprecated dot-source reference tests (and data)
andyleejordan Jan 27, 2023
aa6bfc7
Fix `FindsDetailsForBuiltInCommand` test
andyleejordan Jan 27, 2023
1829093
Fix the rest of the symbols service tests
andyleejordan Jan 27, 2023
6a21c57
Run `FindsDetailsForBuiltInCommand` only on macOS
andyleejordan Jan 27, 2023
6d8b0ba
Skip `FindsSymbolsInDSCFile` as DSC symbols don't yet work
andyleejordan Jan 27, 2023
fd04c34
Mark some methods internal
andyleejordan Jan 28, 2023
3010065
Rename `SymbolReference` fields
andyleejordan Jan 31, 2023
0135baa
Replace `SymbolTypeMatches` logic with prefixed identifiers
andyleejordan Jan 31, 2023
7da6f9d
Strip qualifier from variable name in symbol identifier
andyleejordan Jan 31, 2023
4a90f28
Handle symbol prefix identifier in `CommandHelpers`
andyleejordan Jan 31, 2023
3b08189
More leniently filter workspace symbols
andyleejordan Jan 31, 2023
6d2d5a7
Map symbol types to LSP better
andyleejordan Jan 31, 2023
4c1538b
Restore `public ScriptRegion Create(...)` method
andyleejordan Feb 1, 2023
9e12670
Fix bugs in `VisitorUtils` around `LastIndexOf`
andyleejordan Feb 1, 2023
0739fc1
Distinguish properties/enums from variables
andyleejordan Feb 1, 2023
4296553
Distinguish constructors/methods from functions
andyleejordan Feb 1, 2023
6208b53
Remove unused code from `Extensions.cs`
andyleejordan Feb 1, 2023
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
277 changes: 0 additions & 277 deletions src/PowerShellEditorServices/Extensions/Api/DocumentSymbolService.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ internal EditorExtensionServiceProvider(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
LanguageServer = new LanguageServerService(_serviceProvider.GetService<ILanguageServerFacade>());
//DocumentSymbols = new DocumentSymbolService(_serviceProvider.GetService<SymbolsService>());
ExtensionCommands = new ExtensionCommandService(_serviceProvider.GetService<ExtensionService>());
Workspace = new WorkspaceService(_serviceProvider.GetService<InternalServices.WorkspaceService>());
EditorContext = new EditorContextService(_serviceProvider.GetService<ILanguageServerFacade>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

<!-- TODO: Remove these entirely. -->
<ItemGroup>
<Compile Remove="Extensions\Api\DocumentSymbolService.cs" />
<Compile Remove="Services\Extension\Templating\**" />
<EmbeddedResource Remove="Services\Extension\Templating\**" />
<None Remove="Services\Extension\Templating\**" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.PowerShell.EditorServices.Services;
using Microsoft.PowerShell.EditorServices.Services.Symbols;
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
using Microsoft.PowerShell.EditorServices.Utility;
using Newtonsoft.Json.Linq;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
Expand Down Expand Up @@ -47,7 +46,7 @@ public PesterCodeLensProvider(ConfigurationService configurationService)
private static CodeLens[] GetPesterLens(PesterSymbolReference pesterSymbol, ScriptFile scriptFile)
{
string word = pesterSymbol.Command == PesterCommandType.It ? "test" : "tests";
CodeLens[] codeLensResults = new CodeLens[]
return new CodeLens[]
{
new CodeLens()
{
Expand Down Expand Up @@ -92,8 +91,6 @@ private static CodeLens[] GetPesterLens(PesterSymbolReference pesterSymbol, Scri
}
}
};

return codeLensResults;
}

/// <summary>
Expand All @@ -120,7 +117,7 @@ public CodeLens[] ProvideCodeLenses(ScriptFile scriptFile, CancellationToken can
continue;
}

// Skip codelense for setup/teardown block
// Skip CodeLens for setup/teardown block
if (!PesterSymbolReference.IsPesterTestCommand(pesterSymbol.Command))
{
continue;
Expand Down
Loading