Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Launch Lite Terminal action to Explorer #1438

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
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
5 changes: 4 additions & 1 deletion src/commands/webSocketTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,10 @@ function terminalConfigForUri(
}

return {
name: api.config.serverName && api.config.serverName != "" ? api.config.serverName : "iris",
gjsjohnmurray marked this conversation as resolved.
Show resolved Hide resolved
name:
api.config.serverName && api.config.serverName != ""
? api.config.serverName
: `${api.config.host}:${api.config.port}${api.config.pathPrefix}`,
location:
// Mimic what a built-in profile does. When it is the default and the Terminal tab is selected while empty,
// a terminal is always created in the Panel.
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