(mightBeInBackground: boolean = false)
| 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) { |
no test coverage detected