MCPcopy Create free account
hub / github.com/microsoft/vscode-extension-samples / _update

Method _update

webview-sample/src/extension.ts:144–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 }
143
144 private _update() {
145 const webview = this._panel.webview;
146
147 // Vary the webview's content based on where it is located in the editor.
148 switch (this._panel.viewColumn) {
149 case vscode.ViewColumn.Two:
150 this._updateForCat(webview, 'Compiling Cat');
151 return;
152
153 case vscode.ViewColumn.Three:
154 this._updateForCat(webview, 'Testing Cat');
155 return;
156
157 case vscode.ViewColumn.One:
158 default:
159 this._updateForCat(webview, 'Coding Cat');
160 return;
161 }
162 }
163
164 private _updateForCat(webview: vscode.Webview, catName: keyof typeof cats) {
165 this._panel.title = catName;

Callers 1

constructorMethod · 0.95

Calls 1

_updateForCatMethod · 0.95

Tested by

no test coverage detected