@@ -20,7 +20,7 @@ import { ViewContainer, IViewContainersRegistry, ViewContainerLocation, Extensio
20
20
import { IViewsService } from 'vs/workbench/services/views/common/viewsService' ;
21
21
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer' ;
22
22
import { 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' ;
24
24
import { AUX_WINDOW_GROUP , AUX_WINDOW_GROUP_TYPE , IEditorService } from 'vs/workbench/services/editor/common/editorService' ;
25
25
import { assertIsDefined } from 'vs/base/common/types' ;
26
26
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
@@ -408,16 +408,30 @@ class OutputContribution extends Disposable implements IWorkbenchContribution {
408
408
const editorService = accessor . get ( IEditorService ) ;
409
409
const fileConfigurationService = accessor . get ( IFilesConfigurationService ) ;
410
410
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 ;
415
411
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
+ }
418
427
}
419
428
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" ) } ) ;
421
435
}
422
436
if ( entry ) {
423
437
const resource = assertIsDefined ( entry . channel . file ) ;
0 commit comments