import { ExtensionContext , Uri , window , workspace } from "vscode" ; import { appName } from "./Main" ; export class Display { private outputChannel = window . createOutputChannel ( appName ) ; constructor ( context ) { } output ( message , showChannel = false ) { if ( showChannel ) { this . outputChannel . show ( true ) ; } this . outputChannel . appendLine ( message ) ; } showInformationMessage ( s ) { window . showInformationMessage ( s ) ; } showErrorMessage ( s ) { window . showErrorMessage ( s ) ; } showFile ( path ) { workspace . openTextDocument ( Uri . file ( path ) ) . then ( ( td ) => window . showTextDocument ( td ) ) ; } }