import * as vscode from 'vscode' ; export class StatusBarTerminal { private _item : vscode . StatusBarItem ; private _terminal : vscode . Terminal ; constructor ( terminalIndex , name ? ) { this . _item = vscode . window . createStatusBarItem ( ) ; this . setTerminalIndex ( terminalIndex ) ; this . _item . show ( ) ; this . _terminal = vscode . window . createTerminal ( name ) ; this . _terminal . show ( ) ; } public show ( ) { this . _terminal . show ( ) ; } public setTerminalIndex ( i ) { this . _item . text = `$(terminal)${ i + 1 }` ; this . _item . command = `terminalTabs.showTerminal${ i + 1 }` ; } public hasTerminal ( terminal ) { return this . _terminal === terminal ; } public dispose ( ) { this . _item . dispose ( ) ; this . _terminal . dispose ( ) ; } }