Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ steps:
targetType: inline
pwsh: true
script: |
$assembly = [Reflection.Assembly]::LoadFile('$(Build.SourcesDirectory)/vscode-powershell/modules/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll')
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/vscode-powershell/modules/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll")
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
Write-Host '##vso[task.LogIssue type=error;]PowerShell Editor Services bits were not built in release configuration!'
exit 1
Expand Down
8 changes: 0 additions & 8 deletions examples/ContentViewTest.ps1

This file was deleted.

22 changes: 5 additions & 17 deletions src/features/CodeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,24 @@
// Licensed under the MIT License.

import vscode = require("vscode");
import Window = vscode.window;
import { ILogger } from "../logging";

export class CodeActionsFeature implements vscode.Disposable {
private applyEditsCommand: vscode.Disposable;
private showDocumentationCommand: vscode.Disposable;

constructor(private log: ILogger) {
// TODO: What type is `edit`, what uses this, and is it working?
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.applyEditsCommand = vscode.commands.registerCommand("PowerShell.ApplyCodeActionEdits", async (edit: any) => {
await Window.activeTextEditor?.edit((editBuilder) => {
editBuilder.replace(
new vscode.Range(
edit.StartLineNumber - 1,
edit.StartColumnNumber - 1,
edit.EndLineNumber - 1,
edit.EndColumnNumber - 1),
edit.Text);
});
});

// NOTE: While not exposed to the user via package.json, this is
// required as the server's code action sends across a command name.
//
// TODO: In the far future with LSP 3.19 the server can just set a URL
// and this can go away. See https://github.com/microsoft/language-server-protocol/issues/1548
this.showDocumentationCommand =
vscode.commands.registerCommand("PowerShell.ShowCodeActionDocumentation", async (ruleName: string) => {
await this.showRuleDocumentation(ruleName);
});
}

public dispose(): void {
this.applyEditsCommand.dispose();
this.showDocumentationCommand.dispose();
}

Expand Down
269 changes: 0 additions & 269 deletions src/features/CustomViews.ts

This file was deleted.

62 changes: 0 additions & 62 deletions src/features/RunCode.ts

This file was deleted.

Loading