MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / showMessageWindow

Function showMessageWindow

Extension/src/LanguageServer/client.ts:130–146  ·  view source on GitHub ↗

Note: We should not await on the following functions, * or any function that returns a promise acquired from them, * vscode.window.showInformationMessage, vscode.window.showWarningMessage, vscode.window.showErrorMessage

(params: ShowMessageWindowParams)

Source from the content-addressed store, hash-verified

128 * vscode.window.showInformationMessage, vscode.window.showWarningMessage, vscode.window.showErrorMessage
129*/
130function showMessageWindow(params: ShowMessageWindowParams): void {
131 const message: string = getLocalizedString(params.localizeStringParams);
132 switch (params.type) {
133 case 1: // Error
134 void vscode.window.showErrorMessage(message);
135 break;
136 case 2: // Warning
137 void vscode.window.showWarningMessage(message);
138 break;
139 case 3: // Info
140 void vscode.window.showInformationMessage(message);
141 break;
142 default:
143 console.assert("Unrecognized type for showMessageWindow");
144 break;
145 }
146}
147
148function publishRefactorDiagnostics(params: PublishRefactorDiagnosticsParams): void {
149 if (!diagnosticsCollectionRefactor) {

Callers

nothing calls this directly

Calls 5

getLocalizedStringFunction · 0.90
showErrorMessageMethod · 0.80
showWarningMessageMethod · 0.80
assertMethod · 0.80

Tested by

no test coverage detected