Skip to content

Commit 9d9ff13

Browse files
committed
Branch for pasting JSON from the clipboard as a PowerShell Class
1 parent d7816f2 commit 9d9ff13

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@
6868
"command": "PowerShell.PowerShellFindModule",
6969
"key": "ctrl+K ctrl+f",
7070
"when": "editorTextFocus && editorLangId == 'powershell'"
71+
},
72+
{
73+
"command": "PowerShell.PowerShellPasteAsClass",
74+
"key": "ctrl+K ctrl+p",
75+
"when": "editorTextFocus && editorLangId == 'powershell'"
7176
}
72-
7377
],
7478
"commands": [
7579
{
@@ -96,6 +100,11 @@
96100
"command": "PowerShell.PowerShellFindModule",
97101
"title": "Find/Install PowerShell modules from the gallery",
98102
"category": "PowerShell"
103+
},
104+
{
105+
"command": "PowerShell.PowerShellPasteAsClass",
106+
"title": "Pasted from clipboard as PowerShell class",
107+
"category": "PowerShell"
99108
}
100109
],
101110
"snippets": [

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { registerShowHelpCommand } from './features/ShowOnlineHelp';
1414
import { registerOpenInISECommand } from './features/OpenInISE';
1515
import { registerPowerShellFindModuleCommand } from './features/PowerShellFindModule';
1616
import { registerConsoleCommands } from './features/Console';
17+
import { registerPowerShellPasteAsClass } from './features/PowerShellPasteAsClass';
1718

1819
var languageServerClient: LanguageClient = undefined;
1920

@@ -103,6 +104,7 @@ export function activate(context: vscode.ExtensionContext): void {
103104
registerConsoleCommands(languageServerClient);
104105
registerOpenInISECommand();
105106
registerPowerShellFindModuleCommand(languageServerClient);
107+
registerPowerShellPasteAsClass(languageServerClient);
106108
}
107109

108110
export function deactivate(): void {

0 commit comments

Comments
 (0)