Skip to content

Commit

Permalink
Add Launch Lite Terminal action to Explorer (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsjohnmurray authored Sep 30, 2024
1 parent df9d264 commit bf5c53d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@
"command": "vscode-objectscript.intersystems-servermanager.webterminal",
"when": "false"
},
{
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
"when": "false"
},
{
"command": "vscode-objectscript.importXMLFiles",
"when": "vscode-objectscript.connectActive && workspaceFolderCount != 0"
Expand Down Expand Up @@ -403,6 +407,11 @@
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode.*:extra:/",
"group": "inline@30"
},
{
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode/",
"group": "inline@25"
},
{
"command": "vscode-objectscript.explorer.showGenerated",
"when": "view == ObjectScriptExplorer && viewItem =~ /^serverNode((?!:generated:).)*$/",
Expand Down Expand Up @@ -1170,6 +1179,11 @@
"title": "Launch Lite Terminal",
"icon": "$(terminal)"
},
{
"command": "vscode-objectscript.ObjectScriptExplorer.webterminal",
"title": "Launch Lite Terminal",
"icon": "$(terminal)"
},
{
"category": "ObjectScript",
"command": "vscode-objectscript.importXMLFiles",
Expand Down
11 changes: 11 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,17 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
launchWebSocketTerminal(targetUri);
}
),
vscode.commands.registerCommand("vscode-objectscript.ObjectScriptExplorer.webterminal", (node: NodeBase) => {
const targetUri = DocumentContentProvider.getUri(
node.fullName,
node.workspaceFolder,
node.namespace,
undefined,
undefined,
true
);
launchWebSocketTerminal(targetUri);
}),
vscode.window.registerTerminalProfileProvider(
"vscode-objectscript.webSocketTerminal",
new WebSocketTerminalProfileProvider()
Expand Down

0 comments on commit bf5c53d

Please sign in to comment.