Skip to content

Commit bf5c53d

Browse files
Add Launch Lite Terminal action to Explorer (#1438)
1 parent df9d264 commit bf5c53d

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@
324324
"command": "vscode-objectscript.intersystems-servermanager.webterminal",
325325
"when": "false"
326326
},
327+
{
328+
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
329+
"when": "false"
330+
},
327331
{
328332
"command": "vscode-objectscript.importXMLFiles",
329333
"when": "vscode-objectscript.connectActive && workspaceFolderCount != 0"
@@ -403,6 +407,11 @@
403407
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode.*:extra:/",
404408
"group": "inline@30"
405409
},
410+
{
411+
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
412+
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode/",
413+
"group": "inline@25"
414+
},
406415
{
407416
"command": "vscode-objectscript.explorer.showGenerated",
408417
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode((?!:generated:).)*$/",
@@ -1170,6 +1179,11 @@
11701179
"title": "Launch Lite Terminal",
11711180
"icon": "$(terminal)"
11721181
},
1182+
{
1183+
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
1184+
"title": "Launch Lite Terminal",
1185+
"icon": "$(terminal)"
1186+
},
11731187
{
11741188
"category": "ObjectScript",
11751189
"command": "vscode-objectscript.importXMLFiles",

src/extension.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,17 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
14221422
launchWebSocketTerminal(targetUri);
14231423
}
14241424
),
1425+
vscode.commands.registerCommand("vscode-objectscript.ObjectScriptExplorer.webterminal", (node: NodeBase) => {
1426+
const targetUri = DocumentContentProvider.getUri(
1427+
node.fullName,
1428+
node.workspaceFolder,
1429+
node.namespace,
1430+
undefined,
1431+
undefined,
1432+
true
1433+
);
1434+
launchWebSocketTerminal(targetUri);
1435+
}),
14251436
vscode.window.registerTerminalProfileProvider(
14261437
"vscode-objectscript.webSocketTerminal",
14271438
new WebSocketTerminalProfileProvider()

0 commit comments

Comments
 (0)