Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54bf446cbc | ||
|
|
ecfe50be26 | ||
|
|
623029cc62 | ||
|
|
4076edd843 |
@@ -1,5 +1,8 @@
|
||||
# C/C++ for Visual Studio Code Change Log
|
||||
|
||||
## Version 1.4.1: June 8, 2021
|
||||
* Fix the configuration UI sometimes not populating initially with VS Code 1.56 or later. [#7641](https://github.com/microsoft/vscode-cpptools/issues/7641)
|
||||
|
||||
## Version 1.4.0: May 27, 2021
|
||||
### New Features
|
||||
* Add a C++ walkthrough to the "Getting Started" page. [#7273](https://github.com/microsoft/vscode-cpptools/issues/7273)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "cpptools",
|
||||
"displayName": "C/C++",
|
||||
"description": "C/C++ IntelliSense, debugging, and code browsing.",
|
||||
"version": "1.4.0-main",
|
||||
"version": "1.4.1-main",
|
||||
"publisher": "ms-vscode",
|
||||
"icon": "LanguageCCPP_color_128x.png",
|
||||
"readme": "README.md",
|
||||
|
||||
@@ -975,7 +975,11 @@ export class CppProperties {
|
||||
const settings: CppSettings = new CppSettings(this.rootUri);
|
||||
this.settingsPanel = new SettingsPanel();
|
||||
this.settingsPanel.setKnownCompilers(this.knownCompilers, settings.preferredPathSeparator);
|
||||
this.settingsPanel.SettingsPanelActivated(() => this.onSettingsPanelActivated());
|
||||
this.settingsPanel.SettingsPanelActivated(() => {
|
||||
if (this.settingsPanel?.initialized) {
|
||||
this.onSettingsPanelActivated();
|
||||
}
|
||||
});
|
||||
this.settingsPanel.ConfigValuesChanged(() => this.saveConfigurationUI());
|
||||
this.settingsPanel.ConfigSelectionChanged(() => this.onConfigSelectionChanged());
|
||||
this.settingsPanel.AddConfigRequested((e) => this.onAddConfigRequested(e));
|
||||
@@ -1025,14 +1029,9 @@ export class CppProperties {
|
||||
if (this.settingsPanel.selectedConfigIndex >= this.configurationJson.configurations.length) {
|
||||
this.settingsPanel.selectedConfigIndex = this.CurrentConfigurationIndex;
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (this.settingsPanel && this.configurationJson) {
|
||||
this.settingsPanel.updateConfigUI(configNames,
|
||||
this.configurationJson.configurations[this.settingsPanel.selectedConfigIndex],
|
||||
this.getErrorsForConfigUI(this.settingsPanel.selectedConfigIndex));
|
||||
}
|
||||
},
|
||||
500); // Need some delay or the UI can randomly be blank, particularly in the remote scenario.
|
||||
this.settingsPanel.updateConfigUI(configNames,
|
||||
this.configurationJson.configurations[this.settingsPanel.selectedConfigIndex],
|
||||
this.getErrorsForConfigUI(this.settingsPanel.selectedConfigIndex));
|
||||
} else {
|
||||
// Parse failed, open json file
|
||||
vscode.workspace.openTextDocument(this.propertiesFile);
|
||||
|
||||
@@ -73,6 +73,12 @@ export class SettingsPanel {
|
||||
private static readonly viewType: string = 'settingsPanel';
|
||||
private static readonly title: string = 'C/C++ Configurations';
|
||||
|
||||
// Used to workaround a VS Code 1.56 regression in which webViewPanel.onDidChangeViewState
|
||||
// gets called before the SettingsApp constructor is finished running.
|
||||
// It repros with a higher probability in cases that cause a slower load,
|
||||
// such as after switching to a Chinese language pack or in the remote scenario.
|
||||
public initialized: boolean = false;
|
||||
|
||||
constructor() {
|
||||
this.disposable = vscode.Disposable.from(
|
||||
this.settingsPanelActivated,
|
||||
@@ -91,6 +97,8 @@ export class SettingsPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
this.initialized = false;
|
||||
|
||||
// Create new panel
|
||||
this.panel = vscode.window.createWebviewPanel(
|
||||
SettingsPanel.viewType,
|
||||
@@ -211,7 +219,7 @@ export class SettingsPanel {
|
||||
private updateWebview(configSelection: string[], configuration: config.Configuration, errors: config.ConfigurationErrors | null): void {
|
||||
this.configValues = {...configuration}; // Copy configuration values
|
||||
this.isIntelliSenseModeDefined = (this.configValues.intelliSenseMode !== undefined);
|
||||
if (this.panel) {
|
||||
if (this.panel && this.initialized) {
|
||||
this.panel.webview.postMessage({ command: 'setKnownCompilers', compilers: this.compilerPaths });
|
||||
this.panel.webview.postMessage({ command: 'updateConfigSelection', selections: configSelection, selectedIndex: this.configIndexSelected });
|
||||
this.panel.webview.postMessage({ command: 'updateConfig', config: this.configValues });
|
||||
@@ -250,6 +258,10 @@ export class SettingsPanel {
|
||||
case 'knownCompilerSelect':
|
||||
this.knownCompilerSelect();
|
||||
break;
|
||||
case "initialized":
|
||||
this.initialized = true;
|
||||
this.settingsPanelActivated.fire();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,9 @@ class SettingsApp {
|
||||
document.getElementById(elementId.advancedSection).style.display = advancedShown ? "block" : "none";
|
||||
document.getElementById(elementId.showAdvanced).classList.toggle(advancedShown ? "collapse" : "expand", true);
|
||||
document.getElementById(elementId.showAdvanced).addEventListener("click", this.onShowAdvanced.bind(this));
|
||||
this.vsCodeApi.postMessage({
|
||||
command: "initialized"
|
||||
});
|
||||
}
|
||||
|
||||
private addEventsToInputValues(): void {
|
||||
|
||||
Reference in New Issue
Block a user