Skip to content

Commit

Permalink
Merge pull request #390 from KxSystems/ee-fixes
Browse files Browse the repository at this point in the history
Several Fixes
  • Loading branch information
ecmel authored Aug 6, 2024
2 parents 1a4c1f6 + e99d9a8 commit d22df22
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{
"id": "install",
"title": "Register, acquire license and download the q runtime",
"description": " \n[Install runtime](command:kdb.installTools)\n[Ignore/hide this help](command:kdb.hideWalkthrough)",
"description": " \n[Install runtime](command:kdb.installTools)",
"media": {
"image": "resources/kx_install.png",
"altText": "register"
Expand All @@ -67,7 +67,7 @@
{
"id": "view",
"title": "q runtime installed",
"description": " \n[Ignore/hide this help](command:kdb.hideWalkthrough)",
"description": " \n",
"media": {
"markdown": "out/qinstall.md"
},
Expand Down Expand Up @@ -467,13 +467,13 @@
"command": "kdb.execute.block",
"key": "ctrl+shift+e",
"mac": "cmd+shift+e",
"when": "editorLangId == q && !(resourceFilename =~ /.kdb.q/)"
"when": "editorLangId == q"
},
{
"command": "kdb.toggleParameterCache",
"key": "ctrl+shift+y",
"mac": "cmd+shift+y",
"when": "editorLangId == q && !(resourceFilename =~ /.kdb.q/)"
"when": "editorLangId == q"
}
],
"snippets": [
Expand Down
24 changes: 20 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,32 @@ export async function activate(context: ExtensionContext) {
}),
commands.registerCommand("kdb.renameFile", async (item: FileTreeItem) => {
if (item && item.resourceUri) {
const document = await workspace.openTextDocument(item.resourceUri);
await window.showTextDocument(document);
if (item.resourceUri.path.endsWith(".kdb.json")) {
await commands.executeCommand(
"vscode.openWith",
item.resourceUri,
DataSourceEditorProvider.viewType,
);
} else {
const document = await workspace.openTextDocument(item.resourceUri);
await window.showTextDocument(document);
}
await commands.executeCommand("revealInExplorer");
await commands.executeCommand("renameFile");
}
}),
commands.registerCommand("kdb.deleteFile", async (item: FileTreeItem) => {
if (item && item.resourceUri) {
const document = await workspace.openTextDocument(item.resourceUri);
await window.showTextDocument(document);
if (item.resourceUri.path.endsWith(".kdb.json")) {
await commands.executeCommand(
"vscode.openWith",
item.resourceUri,
DataSourceEditorProvider.viewType,
);
} else {
const document = await workspace.openTextDocument(item.resourceUri);
await window.showTextDocument(document);
}
await commands.executeCommand("revealInExplorer");
await commands.executeCommand("deleteFile");
}
Expand Down

0 comments on commit d22df22

Please sign in to comment.