mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-07 07:35:00 +01:00
debug: introduce order when contributing debug views
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -351,9 +351,9 @@ export interface IDebugEditorContribution extends editor.IEditorContribution {
|
||||
// Debug view descriptors and registration
|
||||
|
||||
export class DebugViewDescriptor extends SyncDescriptor<CollapsibleViewletView | AdaptiveCollapsibleViewletView> {
|
||||
// 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 {
|
||||
|
||||
@@ -85,10 +85,10 @@ const openViewletKb: IKeybindings = {
|
||||
(<panel.PanelRegistry>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 = (<wbaregistry.IWorkbenchActionRegistry> platform.Registry.as(wbaregistry.Extensions.WorkbenchActions));
|
||||
|
||||
Reference in New Issue
Block a user