77import { TPromise } from 'vs/base/common/winjs.base' ;
88import { onUnexpectedError } from 'vs/base/common/errors' ;
99import { Remotable , IThreadService } from 'vs/platform/thread/common/thread' ;
10- import { IOutputService , OUTPUT_EDITOR_INPUT_ID } from 'vs/workbench/parts/output/common/output' ;
10+ import { IOutputService , OUTPUT_EDITOR_INPUT_ID , IOutputChannel } from 'vs/workbench/parts/output/common/output' ;
1111import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService' ;
1212
1313export class ExtHostOutputChannel implements vscode . OutputChannel {
@@ -27,30 +27,29 @@ export class ExtHostOutputChannel implements vscode.OutputChannel {
2727
2828 dispose ( ) : void {
2929 if ( ! this . _disposed ) {
30- this . _proxy . clear ( this . _name ) . then ( ( ) => {
31- this . _disposed = true ;
32- } ) ;
30+ this . _proxy . getOutputChannel ( this . _name ) . clear ( ) ;
31+ this . _disposed = true ;
3332 }
3433 }
3534
3635 append ( value : string ) : void {
37- this . _proxy . append ( this . _name , value ) ;
36+ this . _proxy . getOutputChannel ( this . _name ) . append ( value ) ;
3837 }
3938
4039 appendLine ( value : string ) : void {
41- this . append ( value + '\n' ) ;
40+ this . _proxy . getOutputChannel ( this . _name ) . append ( value + '\n' ) ;
4241 }
4342
4443 clear ( ) : void {
45- this . _proxy . clear ( this . _name ) ;
44+ this . _proxy . getOutputChannel ( this . _name ) . clear ( ) ;
4645 }
4746
4847 show ( columnOrPreserveFocus ?: vscode . ViewColumn | boolean , preserveFocus ?: boolean ) : void {
4948 if ( typeof columnOrPreserveFocus === 'boolean' ) {
5049 preserveFocus = columnOrPreserveFocus ;
5150 }
5251
53- this . _proxy . reveal ( this . _name , preserveFocus ) ;
52+ this . _proxy . getOutputChannel ( this . _name ) . show ( preserveFocus ) ;
5453 }
5554
5655 hide ( ) : void {
@@ -87,19 +86,8 @@ export class MainThreadOutputService {
8786 this . _editorService = editorService ;
8887 }
8988
90- public append ( channel : string , value : string ) : TPromise < void > {
91- this . _outputService . getOutputChannel ( channel ) . append ( value ) ;
92- return undefined ;
93- }
94-
95- public clear ( channel : string ) : TPromise < void > {
96- this . _outputService . getOutputChannel ( channel ) . clear ( ) ;
97- return undefined ;
98- }
99-
100- public reveal ( channel : string , preserveFocus : boolean ) : TPromise < void > {
101- this . _outputService . getOutputChannel ( channel ) . show ( preserveFocus ) ;
102- return undefined ;
89+ public getOutputChannel ( channelId ) : IOutputChannel {
90+ return this . _outputService . getOutputChannel ( channelId ) ;
10391 }
10492
10593 public close ( channel : string ) : TPromise < void > {
0 commit comments