@@ -63,7 +63,8 @@ export class OutputService implements IOutputService {
6363 public getOutputChannel ( id : string ) : IOutputChannel {
6464 return {
6565 append : ( output : string ) => this . append ( id , output ) ,
66- clear : ( ) => this . clearOutput ( id )
66+ clear : ( ) => this . clearOutput ( id ) ,
67+ show : ( preserveFocus : boolean ) => this . showOutput ( id , preserveFocus )
6768 } ;
6869 }
6970
@@ -87,8 +88,8 @@ export class OutputService implements IOutputService {
8788 this . _onOutput . fire ( { output : output , channelId : channelId } ) ;
8889 }
8990
90- public getOutput ( channel : string ) : string {
91- return this . receivedOutput [ channel ] || '' ;
91+ public getOutput ( channelId : string ) : string {
92+ return this . receivedOutput [ channelId ] || '' ;
9293 }
9394
9495 public getChannels ( ) : string [ ] {
@@ -99,24 +100,24 @@ export class OutputService implements IOutputService {
99100 return this . activeChannelId ;
100101 }
101102
102- private clearOutput ( channel : string ) : void {
103- this . receivedOutput [ channel ] = '' ;
103+ private clearOutput ( channelId : string ) : void {
104+ this . receivedOutput [ channelId ] = '' ;
104105
105- this . _onOutput . fire ( { channelId : channel , output : null /* indicator to clear output */ } ) ;
106+ this . _onOutput . fire ( { channelId : channelId , output : null /* indicator to clear output */ } ) ;
106107 }
107108
108- public showOutput ( channel : string , preserveFocus ?: boolean ) : TPromise < IEditor > {
109+ private showOutput ( channelId : string , preserveFocus ?: boolean ) : TPromise < IEditor > {
109110 const panel = this . panelService . getActivePanel ( ) ;
110- if ( this . activeChannelId === channel && panel && panel . getId ( ) === OUTPUT_PANEL_ID ) {
111+ if ( this . activeChannelId === channelId && panel && panel . getId ( ) === OUTPUT_PANEL_ID ) {
111112 return TPromise . as ( < OutputPanel > panel ) ;
112113 }
113114
114- this . activeChannelId = channel ;
115+ this . activeChannelId = channelId ;
115116 this . storageService . store ( OUTPUT_ACTIVE_CHANNEL_KEY , this . activeChannelId , StorageScope . WORKSPACE ) ;
116- this . _onActiveOutputChannel . fire ( channel ) ; // emit event that a new channel is active
117+ this . _onActiveOutputChannel . fire ( channelId ) ; // emit event that a new channel is active
117118
118119 return this . panelService . openPanel ( OUTPUT_PANEL_ID , ! preserveFocus ) . then ( ( outputPanel : OutputPanel ) => {
119- return outputPanel && outputPanel . setInput ( OutputEditorInput . getInstance ( this . instantiationService , channel ) , EditorOptions . create ( { preserveFocus : preserveFocus } ) ) .
120+ return outputPanel && outputPanel . setInput ( OutputEditorInput . getInstance ( this . instantiationService , channelId ) , EditorOptions . create ( { preserveFocus : preserveFocus } ) ) .
120121 then ( ( ) => outputPanel ) ;
121122 } ) ;
122123 }
0 commit comments