MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / setContextValues

Method setContextValues

src/plotViewer/index.ts:527–536  ·  view source on GitHub ↗
(mightBeInBackground: boolean = false)

Source from the content-addressed store, hash-verified

525
526
527 public async setContextValues(mightBeInBackground: boolean = false): Promise<void> {
528 if (this.webviewPanel?.active) {
529 this.parent.registerActiveViewer(this);
530 await setContext('r.plot.active', true);
531 await setContext('r.plot.canGoBack', this.activeIndex > 0);
532 await setContext('r.plot.canGoForward', this.activeIndex < this.plots.length - 1);
533 } else if (!mightBeInBackground) {
534 await setContext('r.plot.active', false);
535 }
536 }
537
538 public getPanelPath(): string | undefined {
539 if (!this.webviewPanel) {

Callers 4

_focusPlotMethod · 0.95
addPlotMethod · 0.95
refreshHtmlMethod · 0.95
makeNewWebviewMethod · 0.95

Calls 2

setContextFunction · 0.90
registerActiveViewerMethod · 0.80

Tested by

no test coverage detected