@@ -13,7 +13,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
1313import { IStorageService , StorageScope } from 'vs/platform/storage/common/storage' ;
1414import { Registry } from 'vs/platform/platform' ;
1515import { EditorOptions } from 'vs/workbench/common/editor' ;
16- import { OutputEditors , IOutputEvent , IOutputChannel , IOutputService , Extensions , OUTPUT_PANEL_ID , IOutputChannelRegistry , MAX_OUTPUT_LENGTH , OUTPUT_SCHEME , OUTPUT_MIME } from 'vs/workbench/parts/output/common/output' ;
16+ import { IOutputChannelIdentifier , OutputEditors , IOutputEvent , IOutputChannel , IOutputService , Extensions , OUTPUT_PANEL_ID , IOutputChannelRegistry , MAX_OUTPUT_LENGTH , OUTPUT_SCHEME , OUTPUT_MIME } from 'vs/workbench/parts/output/common/output' ;
1717import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel' ;
1818import { IPanelService } from 'vs/workbench/services/panel/common/panelService' ;
1919import { IModelService } from 'vs/editor/common/services/modelService' ;
@@ -56,7 +56,7 @@ export class OutputService implements IOutputService {
5656
5757 this . receivedOutput = Object . create ( null ) ;
5858
59- const channels = Registry . as < IOutputChannelRegistry > ( Extensions . OutputChannels ) . getChannels ( ) ;
59+ const channels = this . getChannels ( ) ;
6060 this . activeChannelId = this . storageService . get ( OUTPUT_ACTIVE_CHANNEL_KEY , StorageScope . WORKSPACE , channels && channels . length > 0 ? channels [ 0 ] . id : null ) ;
6161
6262 this . _outputLinkDetector = new OutputLinkProvider ( contextService , modelService ) ;
@@ -78,7 +78,7 @@ export class OutputService implements IOutputService {
7878 }
7979
8080 public getChannel ( id : string ) : IOutputChannel {
81- const channelData = Registry . as < IOutputChannelRegistry > ( Extensions . OutputChannels ) . getChannels ( ) . filter ( channelData => channelData . id === id ) . pop ( ) ;
81+ const channelData = this . getChannels ( ) . filter ( channelData => channelData . id === id ) . pop ( ) ;
8282
8383 const self = this ;
8484 return {
@@ -93,6 +93,10 @@ export class OutputService implements IOutputService {
9393 } ;
9494 }
9595
96+ public getChannels ( ) : IOutputChannelIdentifier [ ] {
97+ return Registry . as < IOutputChannelRegistry > ( Extensions . OutputChannels ) . getChannels ( ) ;
98+ }
99+
96100 private append ( channelId : string , output : string ) : void {
97101
98102 // Initialize
0 commit comments