Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/snehara/transfer from sb to psv #3407

Merged
merged 12 commits into from
Oct 31, 2023
1 change: 1 addition & 0 deletions .github/workflows/close-old-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ jobs:
days-before-close: ${{ env.close-days }}
close-issue-message: "This issue is now closed due to there being no activity on it for the past ${{ env.close-days }} days since being marked as '${{ env.stale-label }}'."
operations-per-run: 500
close-issue-reason: "not_planned"
1 change: 1 addition & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
days-before-close: ${{ env.close-days }}
close-issue-message: "This issue is now closed due to there being no activity on it for the past ${{ env.close-days }} days since being marked as '${{ env.stale-label }}'."
operations-per-run: 500
close-issue-reason: "not_planned"

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Improvements:
- If the "configure" button of CMakeLists.txt node in the Project Outline is clicked, only the corresponding project is configured. [PR #3372](https://github.com/microsoft/vscode-cmake-tools/pull/3372) [@vlavati](https://github.com/vlavati)
- Added a command to directly open the extension settings (`CMake: Open CMake Tools Extension Settings`) and a gear icon button in the Project Status View title bar that calls it. [PR #3403](https://github.com/microsoft/vscode-cmake-tools/pull/3403)
- Added an icon button in the Project Status View title bar that calls the `CMake: Delete Cache and Reconfigure` command. [PR #3403](https://github.com/microsoft/vscode-cmake-tools/pull/3403)
- By default, all of the status bar options are hidden except `build`, `debug`, and `launch`. All of the previous status bar options are now, by default, visible in the Project Status View. These visibility settings can be customized in the `cmake.status.advanced` setting. This setting can also be accessed via the Project Status View. The `cmake.useProjectStatusView` setting is now removed. [PR #3407](https://github.com/microsoft/vscode-cmake-tools/pull/3407)

Bug Fixes:
- Fix Unhandled Exception if no args are specified in `cmake.getLaunchTargetFilename` inside an input context of a task. [PR #3348](https://github.com/microsoft/vscode-cmake-tools/issues/3348) [@vlavati](https://github.com/vlavati)
Expand Down
323 changes: 247 additions & 76 deletions package.json

Large diffs are not rendered by default.

32 changes: 22 additions & 10 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,35 @@
"cmake-tools.configuration.cmake.touchbar.visibility.description": "Configures how the extension displays the buttons on a MacBook Touch Bar.",
"cmake-tools.configuration.cmake.touchbar.visibility.default.description": "Show Touch Bar buttons on supported systems.",
"cmake-tools.configuration.cmake.touchbar.visibility.hidden.description": "Do not show Touch Bar buttons.",
"cmake-tools.configuration.cmake.statusbar.visibility.description": "Configures how the extension displays the buttons in the status bar.",
"cmake-tools.configuration.cmake.statusbar.visibility.markdownDescription": {
"message": "Configures how the extension displays the buttons in the status bar. Only applies when `#cmake.useProjectStatusView#` is set to `false`.",
"cmake-tools.configuration.cmake.showOptionsMovedNotification": "Enables the notification regarding the status bar options moving to the Project Status View to show when the extension starts.",
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.visible.description": "Show the status bar item at full size.",
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.icon.description": "Show the status bar item's icon only.",
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.compact.markdownDescription": "Show the status bar item with the text truncated to the length specified in `#cmake.status.advanced.statusBarLength#` (default is 20).",
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.variantStatus.compact.description": "Show the status bar item with the status message removed.",
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.hidden.description": "Hides the status bar item.",
"cmake-tools.configuration.cmake.status.advanced.projectStatusVisibility.visible.description": "Show the node in the Project Status View.",
"cmake-tools.configuration.cmake.status.advanced.projectStatusVisibility.hidden.description": "Hide the node and its children in the Project Status View.",
"cmake-tools.configuration.cmake.status.statusBarVisibility.markdownDescription": {
"message": "Configures how the extension displays the items in the Status Bar. These settings may be overwritten by the more specific `#cmake.status.advanced.statusBarVisibility#` setting. For more information look [here](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-project-view.md).",
"comment": [
"Markdown text between `` and () should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
]
},
"cmake-tools.configuration.cmake.status.advanced.statusBarVisibility.markdownDescription": {
"message": "Configures the settings for individual Status Bar items. These settings overwrite the more general `#cmake.status.statusBarVisibility#` setting.",
"comment": [
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
]
},
"cmake-tools.configuration.cmake.statusbar.advanced.description": "Configures the settings for individual status bar buttons. These settings overwrite the more general 'cmake.statusbar.visibility' setting.",
"cmake-tools.configuration.cmake.statusbar.advanced.markdownDescription": {
"message": "Configures the settings for individual status bar buttons. These settings overwrite the more general `#cmake.statusbar.visibility#` setting. Only applies when `#cmake.useProjectStatusView#` is set to `false`.",
"cmake-tools.configuration.cmake.status.advanced.markdownDescription": {
"message": "Configures the settings for individual Project Status View and Status Bar items. These settings may overwrite the more general `#cmake.status.statusBarVisibility#` setting. For more information look [here](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-project-view.md).",
"comment": [
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
]
},
"cmake-tools.configuration.cmake.statusbar.advanced.visibility.description": "Configures how the extension displays this button in the status bar.",
"cmake-tools.configuration.cmake.statusbar.advanced.ctest.color.description": "Enables a change in color for this button depending on test results.",
"cmake-tools.configuration.cmake.statusbar.advanced.length.description": "Configures the maximum length of visible text in 'compact' mode.",
"cmake-tools.configuration.cmake.useProjectStatusView.description": "Enables the Project Status view in the CMake side panel and hides the status bar buttons.",
"cmake-tools.configuration.cmake.status.advanced.projectStatusVisibility.description": "Configures how the extension displays this item the Project Status View.",
"cmake-tools.configuration.cmake.status.advanced.ctest.color.description": "Enables a change in color for this item depending on test results.",
"cmake-tools.configuration.cmake.status.advanced.statusBarLength.description": "Configures the maximum length of visible text in the Status Bar when set to 'compact' mode.",
"cmake-tools.configuration.views.cmake.folders.description": "Folders",
"cmake-tools.configuration.views.cmake.projectStatus.description": "Project Status",
"cmake-tools.configuration.views.cmake.outline.description": "Project Outline",
Expand Down Expand Up @@ -246,5 +257,6 @@
"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.command.cmake.projectStatus.openVisibilitySettings.title": "Open Visibility Settings",
"cmake-tools.debugger.label": "CMake Debugger"
}
4 changes: 4 additions & 0 deletions res/dark/json-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 res/light/json-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 7 additions & 14 deletions src/cmakeProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { VariantManager } from './variant';
import * as nls from 'vscode-nls';
import { ConfigurationWebview } from './cacheView';
import { enableFullFeatureSet, updateFullFeatureSet } from './extension';
import { CMakeCommunicationMode, ConfigurationReader, StatusBarConfig, UseCMakePresets } from './config';
import { CMakeCommunicationMode, ConfigurationReader, StatusConfig, UseCMakePresets } from './config';
import * as preset from '@cmt/preset';
import * as util from '@cmt/util';
import { Environment, EnvironmentUtils } from './environmentVariables';
Expand Down Expand Up @@ -914,9 +914,7 @@ export class CMakeProject {
private async init(sourceDirectory: string) {
log.debug(localize('second.phase.init', 'Starting CMake Tools second-phase init'));
await this.setSourceDir(await util.normalizeAndVerifySourceDir(sourceDirectory, CMakeDriver.sourceDirExpansionOptions(this.workspaceContext.folder.uri.fsPath)));
this.hideBuildButton = (this.workspaceContext.config.statusbar.advanced?.build?.visibility === "hidden") ? true : false;
this.hideDebugButton = (this.workspaceContext.config.statusbar.advanced?.debug?.visibility === "hidden") ? true : false;
this.hideLaunchButton = (this.workspaceContext.config.statusbar.advanced?.launch?.visibility === "hidden") ? true : false;
this.doStatusChange(this.workspaceContext.config.status);
// Start up the variant manager
await this.variantManager.initialize(this.folderName);
// Set the status bar message
Expand Down Expand Up @@ -2826,16 +2824,11 @@ export class CMakeProject {
public hideBuildButton: boolean = false;
public hideDebugButton: boolean = false;
public hideLaunchButton: boolean = false;
doStatusBarChange(statusbar: StatusBarConfig) {
if (statusbar.visibility === "hidden") {
this.hideBuildButton = true;
this.hideDebugButton = true;
this.hideLaunchButton = true;
return;
}
this.hideBuildButton = (statusbar.advanced?.build?.visibility === "hidden") ? true : false;
this.hideDebugButton = (statusbar.advanced?.debug?.visibility === "hidden") ? true : false;
this.hideLaunchButton = (statusbar.advanced?.launch?.visibility === "hidden") ? true : false;

doStatusChange(status: StatusConfig) {
this.hideBuildButton = (status?.advanced?.build?.statusBarVisibility === "hidden" && status?.advanced?.build?.projectStatusVisibility === "hidden") ? true : false;
this.hideDebugButton = (status?.advanced?.debug?.statusBarVisibility === "hidden" && status?.advanced?.debug?.projectStatusVisibility === "hidden") ? true : false;
this.hideLaunchButton = (status?.advanced?.launch?.statusBarVisibility === "hidden" && status?.advanced?.launch?.projectStatusVisibility === "hidden") ? true : false;
}
}

Expand Down
Loading
Loading