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"
},
{
"command": "codeQL.openDataExtensionsEditor",
"command": "codeQL.openModelEditor",
"title": "CodeQL: Open CodeQL Model Editor"
},
{
@@ -1415,7 +1415,7 @@
"when": "false"
},
{
"command": "codeQL.openDataExtensionsEditor",
"command": "codeQL.openModelEditor",
"when": "config.codeQL.canary && config.codeQL.dataExtensions.editor"
},
{
@@ -1763,7 +1763,7 @@
{
"id": "codeQLMethodsUsage",
"name": "CodeQL Methods Usage",
"when": "config.codeQL.canary && codeql.dataExtensionsEditorOpen"
"when": "config.codeQL.canary && codeql.modelEditorOpen"
}
],
"explorer": [
@@ -1771,7 +1771,7 @@
"type": "webview",
"id": "codeQLMethodModeling",
"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 = {
"codeQL.openDataExtensionsEditor": () => Promise<void>;
"codeQLDataExtensionsEditor.jumpToUsageLocation": (
"codeQL.openModelEditor": () => Promise<void>;
"codeQLModelEditor.jumpToUsageLocation": (
usage: Usage,
databaseItem: DatabaseItem,
) => Promise<void>;

View File

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

View File

@@ -83,7 +83,7 @@ export class ModelEditorModule extends DisposableObject {
public getCommands(): ModelEditorCommands {
return {
"codeQL.openDataExtensionsEditor": async () => {
"codeQL.openModelEditor": async () => {
const db = this.databaseManager.currentDatabaseItem;
if (!db) {
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,
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.
void this.app.commands.execute(
"setContext",
"codeql.dataExtensionsEditorOpen",
"codeql.modelEditorOpen",
this.isAModelEditorOpen(),
);
});
@@ -125,7 +125,7 @@ export class ModelEditorView extends AbstractWebview<
void this.app.commands.execute(
"setContext",
"codeql.dataExtensionsEditorOpen",
"codeql.modelEditorOpen",
true,
);
}

View File

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