@@ -20,7 +20,7 @@ import { ViewContainer, IViewContainersRegistry, ViewContainerLocation, Extensio
2020import { IViewsService } from 'vs/workbench/services/views/common/viewsService' ;
2121import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer' ;
2222import { IConfigurationRegistry , Extensions as ConfigurationExtensions , ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry' ;
23- import { IQuickPickItem , IQuickInputService , IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput' ;
23+ import { IQuickPickItem , IQuickInputService , IQuickPickSeparator , QuickPickInput } from 'vs/platform/quickinput/common/quickInput' ;
2424import { AUX_WINDOW_GROUP , AUX_WINDOW_GROUP_TYPE , IEditorService } from 'vs/workbench/services/editor/common/editorService' ;
2525import { assertIsDefined } from 'vs/base/common/types' ;
2626import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
@@ -408,16 +408,30 @@ class OutputContribution extends Disposable implements IWorkbenchContribution {
408408 const editorService = accessor . get ( IEditorService ) ;
409409 const fileConfigurationService = accessor . get ( IFilesConfigurationService ) ;
410410
411- const entries : IOutputChannelQuickPickItem [ ] = outputService . getChannelDescriptors ( ) . filter ( c => c . file && c . log )
412- . map ( channel => ( < IOutputChannelQuickPickItem > { id : channel . id , label : channel . label , channel } ) ) ;
413-
414- const argName = args && typeof args === 'string' ? args : undefined ;
415411 let entry : IOutputChannelQuickPickItem | undefined ;
416- if ( argName ) {
417- entry = entries . find ( e => e . id === argName ) ;
412+ const argName = args && typeof args === 'string' ? args : undefined ;
413+ const extensionChannels : IOutputChannelQuickPickItem [ ] = [ ] ;
414+ const coreChannels : IOutputChannelQuickPickItem [ ] = [ ] ;
415+ for ( const c of outputService . getChannelDescriptors ( ) ) {
416+ if ( c . file && c . log ) {
417+ const e = { id : c . id , label : c . label , channel : c } ;
418+ if ( c . extensionId ) {
419+ extensionChannels . push ( e ) ;
420+ } else {
421+ coreChannels . push ( e ) ;
422+ }
423+ if ( e . id === argName ) {
424+ entry = e ;
425+ }
426+ }
418427 }
419428 if ( ! entry ) {
420- entry = await quickInputService . pick ( entries , { placeHolder : nls . localize ( 'selectlogFile' , "Select Log File" ) } ) ;
429+ const entries : QuickPickInput [ ] = [ ...extensionChannels . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ] ;
430+ if ( entries . length && coreChannels . length ) {
431+ entries . push ( { type : 'separator' } ) ;
432+ entries . push ( ...coreChannels . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ) ;
433+ }
434+ entry = < IOutputChannelQuickPickItem | undefined > await quickInputService . pick ( entries , { placeHolder : nls . localize ( 'selectlogFile' , "Select Log File" ) } ) ;
421435 }
422436 if ( entry ) {
423437 const resource = assertIsDefined ( entry . channel . file ) ;
0 commit comments