Skip to content

Commit 8556cc6

Browse files
committed
Include only Expand Alias support
1 parent a14d007 commit 8556cc6

File tree

4 files changed

+0
-86
lines changed

4 files changed

+0
-86
lines changed

src/PowerShellEditorServices.Host/LanguageServer.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ public void Initialize()
5656
this.AddRequestHandler(WorkspaceSymbolRequest.Type, this.HandleWorkspaceSymbolRequest);
5757

5858
this.AddRequestHandler(ShowOnlineHelpRequest.Type, this.HandleShowOnlineHelpRequest);
59-
60-
this.AddRequestHandler(FindModuleRequest.Type, this.HandleFindModuleRequest);
61-
this.AddRequestHandler(GetInstalledModuleRequest.Type, this.HandleGetInstalledModuleRequest);
6259
this.AddRequestHandler(ExpandAliasRequest.Type, this.HandleExpandAliasRequest);
6360

6461
this.AddRequestHandler(DebugAdapterMessages.EvaluateRequest.Type, this.HandleEvaluateRequest);
@@ -156,55 +153,6 @@ await editorSession.PowerShellContext.ExecuteCommand<object>(
156153
await requestContext.SendResult(null);
157154
}
158155

159-
private async Task HandleFindModuleRequest(
160-
string param,
161-
EditorSession editorSession,
162-
RequestContext<object, object> requestContext)
163-
{
164-
var psCommand = new PSCommand();
165-
psCommand.AddScript("Find-Module | Select Name, Description");
166-
167-
var modules = await editorSession.PowerShellContext.ExecuteCommand<PSObject>(
168-
psCommand);
169-
170-
var moduleList = new List<PSModuleMessage>();
171-
172-
if (modules != null)
173-
{
174-
foreach (dynamic m in modules)
175-
{
176-
moduleList.Add(new PSModuleMessage { Name = m.Name, Description = m.Description });
177-
}
178-
}
179-
180-
await requestContext.SendResult(new PSModuleResponse { ModuleList = moduleList });
181-
}
182-
183-
private async Task HandleGetInstalledModuleRequest(
184-
string param,
185-
EditorSession editorSession,
186-
RequestContext<object, object> requestContext)
187-
{
188-
var psCommand = new PSCommand();
189-
psCommand.AddScript("Get-InstalledModule | Select Name, Description");
190-
191-
var modules = await editorSession.PowerShellContext.ExecuteCommand<PSObject>(
192-
psCommand);
193-
194-
var moduleList = new List<PSModuleMessage>();
195-
196-
if (modules != null)
197-
{
198-
foreach (dynamic m in modules)
199-
{
200-
moduleList.Add(new PSModuleMessage { Name = m.Name, Description = m.Description });
201-
}
202-
}
203-
204-
await requestContext.SendResult(new PSModuleResponse { ModuleList = moduleList });
205-
}
206-
207-
208156
private async Task HandleExpandAliasRequest(
209157
string content,
210158
EditorSession editorSession,

src/PowerShellEditorServices.Protocol/LanguageServer/FindModuleRequest.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/PowerShellEditorServices.Protocol/LanguageServer/GetInstalledModuleRequest.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@
9393
<Compile Include="LanguageServer\Definition.cs" />
9494
<Compile Include="LanguageServer\DocumentHighlight.cs" />
9595
<Compile Include="LanguageServer\ExpandAliasRequest.cs" />
96-
<Compile Include="LanguageServer\GetInstalledModuleRequest.cs" />
9796
<Compile Include="LanguageServer\Hover.cs" />
98-
<Compile Include="LanguageServer\FindModuleRequest.cs" />
9997
<Compile Include="LanguageServer\PSModuleMessage.cs" />
10098
<Compile Include="LanguageServer\ShowOnlineHelpRequest.cs" />
10199
<Compile Include="LanguageServer\SignatureHelp.cs" />

0 commit comments

Comments
 (0)