Skip to content

Commit 54bce1b

Browse files
refactoring commands
1 parent e4ca9d4 commit 54bce1b

File tree

11 files changed

+636
-505
lines changed

11 files changed

+636
-505
lines changed

package.json

Lines changed: 93 additions & 93 deletions
Large diffs are not rendered by default.

src/classes/localConnection.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class LocalConnection {
9292
.then((res) => {
9393
if (res) {
9494
commands.executeCommand(
95-
"kdb.startLocalProcess",
95+
"kdb.connections.localProcess.start",
9696
ext.connectionsList.find(
9797
(conn) => conn.label === this.connLabel,
9898
),
@@ -112,7 +112,7 @@ export class LocalConnection {
112112
return;
113113
}
114114
conn.addListener("close", () => {
115-
commands.executeCommand("kdb.disconnect", this.connLabel);
115+
commands.executeCommand("kdb.connections.disconnect", this.connLabel);
116116
kdbOutputLog(
117117
`Connection closed: ${this.options.host}:${this.options.port}`,
118118
"INFO",
@@ -316,7 +316,6 @@ export class LocalConnection {
316316
});
317317
}
318318

319-
320319
private updateGlobals(result: any): void {
321320
const globals = result;
322321
const entries: [string, any][] = Object.entries(globals);
@@ -346,7 +345,6 @@ export class LocalConnection {
346345
}
347346
});
348347
}
349-
350348

351349
private updateReservedKeywords() {
352350
const reservedQuery = ".Q.res";

src/commands/workspaceCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ export class ConnectionLensProvider implements CodeLensProvider {
323323
const top = new Range(0, 0, 0, 0);
324324
const runScratchpad = new CodeLens(top, {
325325
command: isPython(document.uri)
326-
? "kdb.execute.pythonFileScratchpadQuery"
326+
? "kdb.scratchpad.python.run.file"
327327
: "kdb.execute.fileQuery",
328328
title: server ? `Run on ${server}` : "Run",
329329
});
330330
const pickConnection = new CodeLens(top, {
331-
command: "kdb.pickConnection",
331+
command: "kdb.file.pickConnection",
332332
title: "Choose Connection",
333333
});
334334
return [runScratchpad, pickConnection];
@@ -345,7 +345,7 @@ export function connectWorkspaceCommands() {
345345
);
346346
ext.runScratchpadItem.command = <Command>{
347347
title: "",
348-
command: "kdb.runScratchpad",
348+
command: "kdb.scratchpad.run",
349349
arguments: [],
350350
};
351351

0 commit comments

Comments
 (0)