Skip to content

Commit

Permalink
added cleanConfigure command (delete cache and reconfigure) to projec…
Browse files Browse the repository at this point in the history
…t status view title bar
  • Loading branch information
snehara99 committed Oct 23, 2023
1 parent dfdcd86 commit ad26aa0
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 3 deletions.
30 changes: 27 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@
"command": "cmake.outline.cleanConfigure",
"title": "%cmake-tools.command.cmake.outline.cleanConfigure.title%"
},
{
"command": "cmake.projectStatus.cleanConfigure",
"title": "%cmake-tools.command.cmake.projectStatus.cleanConfigure.title%",
"when": "cmake:enableFullFeatureSet",
"category": "CMake",
"icon": {
"dark": "res/dark/clean-configure-icon.svg",
"light": "res/light/clean-configure-icon.svg"
}
},
{
"command": "cmake.cleanConfigureWithDebugger",
"title": "%cmake-tools.command.cmake.cleanConfigureWithDebugger.title%",
Expand Down Expand Up @@ -1246,6 +1256,10 @@
"command": "cmake.projectStatus.configure",
"when": "never"
},
{
"command": "cmake.projectStatus.cleanConfigure",
"when": "never"
},
{
"command": "cmake.projectStatus.setVariant",
"when": "never"
Expand Down Expand Up @@ -1297,20 +1311,25 @@
"when": "view == cmake.projectStatus && cmake:enableFullFeatureSet",
"group": "navigation@1"
},
{
"command": "cmake.projectStatus.cleanConfigure",
"when": "view == cmake.projectStatus && cmake:enableFullFeatureSet",
"group": "navigation@2"
},
{
"command": "cmake.projectStatus.stop",
"when": "view == cmake.projectStatus && cmake:isBuilding && cmake:enableFullFeatureSet",
"group": "navigation@2"
"group": "navigation@3"
},
{
"command": "cmake.projectStatus.debugTarget",
"when": "view == cmake.projectStatus && !cmake:isBuilding && !cmake:hideDebugCommand && cmake:enableFullFeatureSet",
"group": "navigation@3"
"group": "navigation@4"
},
{
"command": "cmake.projectStatus.launchTarget",
"when": "view == cmake.projectStatus && !cmake:isBuilding && !cmake:hideLaunchCommand && cmake:enableFullFeatureSet",
"group": "navigation@3"
"group": "navigation@4"
},
{
"command": "cmake.outline.configureAll",
Expand Down Expand Up @@ -1374,6 +1393,11 @@
"when": "view == cmake.projectStatus && cmake:enableFullFeatureSet && viewItem == 'configure'",
"group": "inline"
},
{
"command": "cmake.projectStatus.cleanConfigure",
"when": "view == cmake.projectStatus && cmake:enableFullFeatureSet && viewItem == 'cleanConfigure'",
"group": "inline"
},
{
"command": "cmake.projectStatus.setVariant",
"when": "view == cmake.projectStatus && cmake:enableFullFeatureSet && viewItem == 'variant'",
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
"cmake-tools.configuration.cmake.launchBehavior.newTerminal.markdownDescriptions": "A new terminal instance is created and the target is launched in it. Existing terminals are not automatically cleaned up.",
"cmake-tools.configuration.cmake.loadCompileCommands.description": "Controls whether the extension reads compile_commands.json to enable single file compilation.",
"cmake-tools.command.cmake.projectStatus.update.title": "Refresh the project status",
"cmake-tools.command.cmake.projectStatus.cleanConfigure.title": "Delete Cache and Reconfigure",
"cmake-tools.command.cmake.projectStatus.selectTestPreset.title": "Set Test Target",
"cmake-tools.debugger.label": "CMake Debugger"
}
27 changes: 27 additions & 0 deletions res/dark/clean-configure-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions res/light/clean-configure-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/projectStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class ProjectStatus {
vscode.commands.registerCommand('cmake.projectStatus.stop', async (_node: Node) => {
await runCommand('stop');
}),
vscode.commands.registerCommand('cmake.projectStatus.cleanConfigure', async (_node: Node) => {
await runCommand('cleanConfigure');
await this.refresh();
}),
vscode.commands.registerCommand('cmake.projectStatus.selectKit', async (_node: Node) => {
await runCommand('selectKit');
await this.refresh();
Expand Down

0 comments on commit ad26aa0

Please sign in to comment.