From 206ceb98164c87f03f1ae72a477758ec2d970078 Mon Sep 17 00:00:00 2001 From: Sinem Akinci <99284450+sinemakinci1@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:03:08 +0000 Subject: [PATCH] addressing more comments --- docs/cmake-project-view.md | 55 ++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/docs/cmake-project-view.md b/docs/cmake-project-view.md index 20d1503d2..064a1062b 100644 --- a/docs/cmake-project-view.md +++ b/docs/cmake-project-view.md @@ -1,4 +1,4 @@ -# CMake Project Outline View +# CMake Options Visibility Configuration Starting in CMake Tools 1.16, we will provide users the ability to customize their status bar with related CMake items like presets, kits, variants, build, configure, and launch to allow for users to de-clutter this global status bar as much as they would like to, while also having quick access to commonly performed CMake actions. @@ -7,8 +7,8 @@ Users can specify what is shown in the status bar through their `settings.json` The default settings will be set to the following: ## Default Settings Json ```json -"cmake.status.statusBarVisibility": "hidden" -"cmake.status.advanced": { +"cmake.options.statusBarVisibility": "hidden" +"cmake.options.advanced": { "build": { "statusBarVisibility": "visible" }, @@ -33,66 +33,75 @@ To revert to the prior experience and have all of your presets display in the st You can configure settings for each of the following CMake actions in your settings.json to either be `visible` or `hidden` in the status bar through the `statusBarVisibility` variable. Settings that are available to be hidden from the project status view side bar can be configured to be `visible` or `hidden` through the `projectStatusVisibility` variable. -To make options visible in the status bar take up less space, you can configure certain options to be only the respective icon through the `icon` option in `statusBarVisibility` or specify a given character length through the `compact` option in `statusBarVisibility`. If a `statusBarVisibility` option is set to `compact` you can then specify an integer length for how many characters you want an option to take up through the `statusBarLength` option. It will truncate your existing status bar option to that specified character length. The default option is 20 characters +To make options visible in the status bar take up less space, you can configure certain options to be only the respective icon through the `icon` option in `statusBarVisibility` or specify a given character length through the `compact` option in `statusBarVisibility`. If a `statusBarVisibility` option is set to `compact` you can then specify an integer length for how many characters you want an option to take up through the `statusBarLength` option. It will truncate your existing status bar option to that specified character length. The default option is 20 characters. + +You can also configure options to be `visible` or `hidden` in the Project Status View in the CMake Tools sidebar. The options that allow for this customization are: +*`folder` +*`configure` +*`build` +*`ctest` +*`debug` +*`launch` +Note: if you set one of these to hidden, the parent node will entirely be hidden. For example, if you set `build` to `hidden` in `projectStatusVisibility`, the option to select your build preset will also be hidden The full level of options for the CMake status can be seen below: ### CMake Status Bar Configuration Options in your Settings Json ```json -"cmake.status.statusBarVisibility": "visibile", "icon", "compact", "hidden" -"cmake.status.advanced": { +"cmake.options.statusBarVisibility": "visibile", "icon", "compact", "hidden" +"cmake.options.advanced": { "folder": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" - "statusBarLength": 20 + "statusBarVisibility": "visible", "icon", "compact", "hidden", + "statusBarLength": 20, "projectStatusVisibility": "visible", "hidden" }, "configure": { "projectStatusVisibility": "visible", "hidden" }, "configurePreset": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" + "statusBarVisibility": "visible", "icon", "compact", "hidden", "statusBarLength": 20 }, "kit": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" + "statusBarVisibility": "visible", "icon", "compact", "hidden", "statusBarLength": 20 }, - "variantStatus": { + "variant": { "statusBarVisibility": "visible", "icon", "compact", "hidden" }, "build": { - "statusBarVisibility": "visible", "icon", "hidden",\ + "statusBarVisibility": "visible", "icon", "hidden", "projectStatusVisibility": "visible", "hidden" }, "buildPreset": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" + "statusBarVisibility": "visible", "icon", "compact", "hidden", "statusBarLength": 20 }, "buildTarget": { - "statusBarVisibility": "visible", "compact", "hidden" + "statusBarVisibility": "visible", "compact", "hidden", "statusBarLength": 20 }, "ctest": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" - "statusBarLength": 20 - "color": true, false + "statusBarVisibility": "visible", "icon", "compact", "hidden", + "statusBarLength": 20, + "color": true, false, "projectStatusVisibility": "visible", "hidden" }, "testPreset": { - "statusBarVisibility": "visible", "icon", "compact", "hidden" + "statusBarVisibility": "visible", "icon", "compact", "hidden", "statusBarLength": 20 }, "launchTarget": { - "statusBarVisibility": "visible", "compact", "hidden" + "statusBarVisibility": "visible", "compact", "hidden", "statusBarLength": 20 }, "debug": { - "statusBarVisibility": "visible", "hidden" + "statusBarVisibility": "visible", "hidden", "projectStatusVisibility": "visible", "hidden" }, "launch": { - "statusBarVisibility": "visible", "hidden" + "statusBarVisibility": "visible", "hidden", "projectStatusVisibility": "visible", "hidden" } } @@ -102,7 +111,7 @@ The full level of options for the CMake status can be seen below: * `configure` is associated with the CMake Configure action. It can only be found in the Project Status View and can't be seen in the status bar, hence no `statusBarVisibility` property value * `configurePreset` is associated with the CMake Configure Preset. When selected, the user can modify their active CMake Configure Preset from the list detected in their CMakePresets.json and CMakeUserPresets.json (if found in project) * `kit` is associated with the active kit selected (when CMake Presets aren't present). When selected, the user can modify their active kit. To learn more about kits, please see [our kit documentation](https://github.com/microsoft/vscode-cmake-tools/docs/kits.md) -* `variantStatus` is associated with the active variant status (when CMake Presets aren't present). When selected, the user can modify their active variant. To learn more about variants, please see [our variant documentation](https://github.com/microsoft/vscode-cmake-tools/docs/variants.md) +* `variant` is associated with the active variant (when CMake Presets aren't present). When selected, the user can modify their active variant. Variant status does not show on the Project Status View, but will show in the status bar when set to `visible`. To learn more about variants, please see [our variant documentation](https://github.com/microsoft/vscode-cmake-tools/docs/variants.md) * `build` is associated with the CMake Build action. It invokes a CMake build on your build target using your build preset or variant. * `buildPreset` is associated with your active CMake Build Preset. When selected, the user can modify their active CMake Build Preset from the list detected in their CMakePresets.json and CMakeUserPresets.json (if found in project) * `buildTarget` is associated with your active CMake Build Target. When selected, the user can specify their active Build Target. This will be the target invoked when the user presses the `Build` icon in the status bar (if not hidden) or runs `CMake: Build Target` from the Command Palette @@ -112,5 +121,5 @@ The full level of options for the CMake status can be seen below: * `debug` is associated with the CMake Debug action. It invokes a debugger on the active launch target. * `launch` is associated with launching the target. It will run the specified target application in the terminal. -To reset your CMake options back to the default, hover over your `CMake > Statusbar: Visibility setting` and select `Reset Setting` +To reset your CMake options back to the default, hover over your `CMake > Status: Status bar Visibility` and `CMake: Status: Advanced` settings and select the gear icons that appear for more options. From there, select `Reset Setting` on both options ![Screenshot of the VS Code Setting option to Reset Setting to the left of CMake Statusbar visibility](images/cmake-status.png)