diff --git a/package.json b/package.json index 7265c62..a0e9c72 100644 --- a/package.json +++ b/package.json @@ -443,19 +443,24 @@ "group": "build@2" }, { - "command": "mesonbuild.openBuildFile", + "command": "mesonbuild.node.build", "when": "view == meson-project && viewItem == meson-target", - "group": "inline" + "group": "inline@0" }, { "command": "mesonbuild.openBuildFile", "when": "view == meson-project && viewItem == meson-target", - "group": "build" + "group": "inline@1" }, { "command": "mesonbuild.node.build", "when": "view == meson-project && viewItem == meson-target", - "group": "build" + "group": "build@0" + }, + { + "command": "mesonbuild.openBuildFile", + "when": "view == meson-project && viewItem == meson-target", + "group": "build@1" }, { "command": "mesonbuild.node.runAll", diff --git a/src/treeview/nodes/targets.ts b/src/treeview/nodes/targets.ts index 2096590..695cd99 100644 --- a/src/treeview/nodes/targets.ts +++ b/src/treeview/nodes/targets.ts @@ -103,7 +103,7 @@ export class TargetNode extends BaseNode implements IBuildableNode { } } - override async getTreeItem() { + override getTreeItem() { const item = super.getTreeItem() as vscode.TreeItem; item.label = this.target.name; @@ -112,14 +112,6 @@ export class TargetNode extends BaseNode implements IBuildableNode { item.collapsibleState = vscode.TreeItemCollapsibleState.Collapsed; item.contextValue = "meson-target"; - const targetName = await getTargetName(this.target); - - item.command = { - title: `Build ${this.target.name}`, - command: "mesonbuild.build", - arguments: [targetName], - }; - return item; }