Rename in strings.

This commit is contained in:
Anders Starcke Henriksen
2023-08-30 16:26:05 +02:00
parent 05a7d933d1
commit 46f80efa4c
6 changed files with 12 additions and 12 deletions

View File

@@ -943,7 +943,7 @@
"enablement": "codeql.hasQLSource" "enablement": "codeql.hasQLSource"
}, },
{ {
"command": "codeQL.openDataExtensionsEditor", "command": "codeQL.openModelEditor",
"title": "CodeQL: Open CodeQL Model Editor" "title": "CodeQL: Open CodeQL Model Editor"
}, },
{ {
@@ -1415,7 +1415,7 @@
"when": "false" "when": "false"
}, },
{ {
"command": "codeQL.openDataExtensionsEditor", "command": "codeQL.openModelEditor",
"when": "config.codeQL.canary && config.codeQL.dataExtensions.editor" "when": "config.codeQL.canary && config.codeQL.dataExtensions.editor"
}, },
{ {
@@ -1763,7 +1763,7 @@
{ {
"id": "codeQLMethodsUsage", "id": "codeQLMethodsUsage",
"name": "CodeQL Methods Usage", "name": "CodeQL Methods Usage",
"when": "config.codeQL.canary && codeql.dataExtensionsEditorOpen" "when": "config.codeQL.canary && codeql.modelEditorOpen"
} }
], ],
"explorer": [ "explorer": [
@@ -1771,7 +1771,7 @@
"type": "webview", "type": "webview",
"id": "codeQLMethodModeling", "id": "codeQLMethodModeling",
"name": "CodeQL Method Modeling", "name": "CodeQL Method Modeling",
"when": "config.codeQL.canary && config.codeQL.modelEditor.methodModelingView && codeql.dataExtensionsEditorOpen" "when": "config.codeQL.canary && config.codeQL.modelEditor.methodModelingView && codeql.modelEditorOpen"
} }
] ]
}, },

View File

@@ -303,8 +303,8 @@ export type PackagingCommands = {
}; };
export type ModelEditorCommands = { export type ModelEditorCommands = {
"codeQL.openDataExtensionsEditor": () => Promise<void>; "codeQL.openModelEditor": () => Promise<void>;
"codeQLDataExtensionsEditor.jumpToUsageLocation": ( "codeQLModelEditor.jumpToUsageLocation": (
usage: Usage, usage: Usage,
databaseItem: DatabaseItem, databaseItem: DatabaseItem,
) => Promise<void>; ) => Promise<void>;

View File

@@ -79,7 +79,7 @@ export class MethodsUsageDataProvider
collapsibleState: TreeItemCollapsibleState.None, collapsibleState: TreeItemCollapsibleState.None,
command: { command: {
title: "Show usage", title: "Show usage",
command: "codeQLDataExtensionsEditor.jumpToUsageLocation", command: "codeQLModelEditor.jumpToUsageLocation",
arguments: [item, this.databaseItem], arguments: [item, this.databaseItem],
}, },
iconPath: new ThemeIcon("error", new ThemeColor("errorForeground")), iconPath: new ThemeIcon("error", new ThemeColor("errorForeground")),

View File

@@ -83,7 +83,7 @@ export class ModelEditorModule extends DisposableObject {
public getCommands(): ModelEditorCommands { public getCommands(): ModelEditorCommands {
return { return {
"codeQL.openDataExtensionsEditor": async () => { "codeQL.openModelEditor": async () => {
const db = this.databaseManager.currentDatabaseItem; const db = this.databaseManager.currentDatabaseItem;
if (!db) { if (!db) {
void showAndLogErrorMessage(this.app.logger, "No database selected"); void showAndLogErrorMessage(this.app.logger, "No database selected");
@@ -164,7 +164,7 @@ export class ModelEditorModule extends DisposableObject {
}, },
); );
}, },
"codeQLDataExtensionsEditor.jumpToUsageLocation": async ( "codeQLModelEditor.jumpToUsageLocation": async (
usage: Usage, usage: Usage,
databaseItem: DatabaseItem, databaseItem: DatabaseItem,
) => { ) => {

View File

@@ -116,7 +116,7 @@ export class ModelEditorView extends AbstractWebview<
// so we want to check if there are any others still open. // so we want to check if there are any others still open.
void this.app.commands.execute( void this.app.commands.execute(
"setContext", "setContext",
"codeql.dataExtensionsEditorOpen", "codeql.modelEditorOpen",
this.isAModelEditorOpen(), this.isAModelEditorOpen(),
); );
}); });
@@ -125,7 +125,7 @@ export class ModelEditorView extends AbstractWebview<
void this.app.commands.execute( void this.app.commands.execute(
"setContext", "setContext",
"codeql.dataExtensionsEditorOpen", "codeql.modelEditorOpen",
true, true,
); );
} }

View File

@@ -45,7 +45,7 @@ describe("commands declared in package.json", () => {
command.match(/^codeQLAstViewer\./) || command.match(/^codeQLAstViewer\./) ||
command.match(/^codeQLEvalLogViewer\./) || command.match(/^codeQLEvalLogViewer\./) ||
command.match(/^codeQLTests\./) || command.match(/^codeQLTests\./) ||
command.match(/^codeQLDataExtensionsEditor\./) command.match(/^codeQLModelEditor\./)
) { ) {
scopedCmds.add(command); scopedCmds.add(command);
expect(title).toBeDefined(); expect(title).toBeDefined();