'use strict' ; import { Uri , ViewColumn } from 'vscode' ; import { DomainInfo } from 'pddl-workspace' ; import { WebviewAdapter } from './view' ; import { BaseViewPanel } from './BaseViewPanel' ; export class DomainViewPanel extends BaseViewPanel { private needsRebuild = false ; private domain : DomainInfo | undefined ; private error : Error | undefined ; constructor ( uri , panel ) { super ( uri , panel ) ; } setDomain ( domain ) { this . domain = domain ; this . error = undefined ; this . setNeedsRebuild ( true ) ; } setError ( ex ) { this . error = ex ; } getError ( ) { return this . error ; } getDomain ( ) { if ( ! this . domain ) { throw new Error ( `Check if the panel was initialized by calling 'isInitialized' first.` ) ; } return this . domain ; } reveal ( displayColumn ? ) { this . panel . reveal ( displayColumn ?? ViewColumn . Beside ) ; } close ( ) { this . panel . dispose ( ) ; } setNeedsRebuild ( needsRebuild ) { this . needsRebuild = needsRebuild ; } getNeedsRebuild ( ) { return this . needsRebuild ; } getPanel ( ) { return this . panel ; } }