import * as vscode from 'vscode' ; import { DevToolsExtensionContext } from '../devToolsExtensionContext' ; import { JsonEditorProvider } from '../editors/jsonEditorProvider' ; import { AppPackageEditorProvider } from '../editors/appPackageEditorProvider' ; import { DevToolsExtensionService } from './devToolsExtensionService' ; export class EditorsService extends DevToolsExtensionService { constructor ( newContext ) { super ( newContext ) ; this . registerEditors ( ) ; } protected registerEditors ( ) { let options = { webviewOptions : { retainContextWhenHidden : true } } ; this . _context . vscodeExtensionContext . subscriptions . push ( vscode . window . registerCustomEditorProvider ( 'azALDevTools.appPackageEditor' , new AppPackageEditorProvider ( this . _context ) , options ) ) ; this . _context . vscodeExtensionContext . subscriptions . push ( vscode . window . registerCustomEditorProvider ( 'azALDevTools.jsonEditor' , new JsonEditorProvider ( this . _context ) , options ) ) ; } }