diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 369597ac20e..517451b8c9f 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -64,7 +64,7 @@ export class DebugViewlet extends viewlet.Viewlet { if (this.contextService.getWorkspace()) { const actionRunner = this.getActionRunner(); - const viewDescriptors = debug.DebugViewRegistry.getDebugViews(); + const viewDescriptors = debug.DebugViewRegistry.getDebugViews().sort((first, second) => first.order - second.order); this.views = viewDescriptors.map(dsc => this.instantiationService.createInstance(dsc, actionRunner, this.viewletSettings)); this.splitView = new splitview.SplitView(this.$el.getHTMLElement()); diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 55a20664e19..0de88bb1b97 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -351,9 +351,9 @@ export interface IDebugEditorContribution extends editor.IEditorContribution { // Debug view descriptors and registration export class DebugViewDescriptor extends SyncDescriptor { - // constructor(ctorName: string, public id: string, public name: string, public cssClass: string) { - // super(ctorName); - // } + constructor(ctor: any, public order: number) { + super(ctor); + } } export interface IDebugViewRegistry { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index a0c9e83ef5a..9a58b42d01c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -85,10 +85,10 @@ const openViewletKb: IKeybindings = { (platform.Registry.as(panel.Extensions.Panels)).setDefaultPanelId(debug.REPL_ID); // Register default debug views -debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(VariablesView)); -debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(WatchExpressionsView)); -debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(CallStackView)); -debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(BreakpointsView)); +debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(VariablesView, 10)); +debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(WatchExpressionsView, 20)); +debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(CallStackView, 30)); +debug.DebugViewRegistry.registerDebugView(new debug.DebugViewDescriptor(BreakpointsView, 40)); // register action to open viewlet const registry = ( platform.Registry.as(wbaregistry.Extensions.WorkbenchActions));