Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,10 @@ export class DefaultClient implements Client {
});
}

if (changedSettings['codeAnalysis.runAutomatically'] !== undefined || changedSettings['codeAnalysis.clangTidy.enabled'] !== undefined) {
ui.refreshCodeAnalysisText(this.model.isRunningCodeAnalysis.Value);
}

const showButtonSender: string = "settingsChanged";
if (changedSettings["default.configurationProvider"] !== undefined) {
void ui.ShowConfigureIntelliSenseButton(false, this, ConfigurationType.ConfigProvider, showButtonSender);
Expand Down
17 changes: 11 additions & 6 deletions Extension/src/LanguageServer/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ export class LanguageStatusUI {
if (this.isParsingWorkspacePaused) {
const displayTwoStatus: boolean = this.isParsingFiles && this.isParsingWorkspace;
return (this.isParsingFiles ? this.parsingFilesTooltip : "")
+ (displayTwoStatus ? " | " : "")
+ (this.isParsingWorkspace ? this.workspaceParsingPausedText : "");
+ (displayTwoStatus ? " | " : "")
+ (this.isParsingWorkspace ? this.workspaceParsingPausedText : "");
} else {
return this.isParsingWorkspace ? this.workspaceParsingRunningText : this.parsingFilesTooltip;
}
Expand Down Expand Up @@ -260,6 +260,13 @@ export class LanguageStatusUI {
};
return item;
}

public refreshCodeAnalysisText(isRunningCodeAnalysis: boolean) {
const activeText: string = this.isCodeAnalysisPaused ? this.codeAnalysisPausedText : this.codeAnalysisRunningText;
const idleText: string = this.codeAnalysisModePrefix + this.codeAnalysisCurrentMode();
this.codeAnalysisStatusItem.text = isRunningCodeAnalysis ? activeText : idleText;
}

private setIsCodeAnalysisPaused(val: boolean): void {
if (!this.isRunningCodeAnalysis) {
return;
Expand All @@ -286,9 +293,7 @@ export class LanguageStatusUI {
}
this.isRunningCodeAnalysis = val;
this.codeAnalysisStatusItem.busy = val;
const activeText: string = this.isCodeAnalysisPaused ? this.codeAnalysisPausedText : this.codeAnalysisRunningText;
const idleText: string = this.codeAnalysisModePrefix + this.codeAnalysisCurrentMode();
this.codeAnalysisStatusItem.text = val ? activeText : idleText;
this.refreshCodeAnalysisText(val);
this.codeAnalysisStatusItem.command = val ? {
command: "C_Cpp.ShowActiveCodeAnalysisCommands",
title: localize("c.cpp.codeanalysis.statusbar.showCodeAnalysisOptions", "Options"),
Expand Down Expand Up @@ -497,7 +502,7 @@ export class LanguageStatusUI {
// TODO: Check some "AlwaysShow" setting here.
this.ShowConfiguration = isCppOrRelated || (util.getWorkspaceIsCpp() &&
(activeEditor.document.fileName.endsWith("tasks.json") ||
activeEditor.document.fileName.endsWith("launch.json")));
activeEditor.document.fileName.endsWith("launch.json")));

if (this.showConfigureIntelliSenseButton) {
if (isCppOrRelated && !!this.currentClient && this.currentClient.getShowConfigureIntelliSenseButton()) {
Expand Down