提交 3310d3ac 编写于 作者: R rebornix

sort notebook content providers in the list.

上级 337b3e8d
...@@ -237,7 +237,22 @@ export class NotebookContribution extends Disposable implements IWorkbenchContri ...@@ -237,7 +237,22 @@ export class NotebookContribution extends Disposable implements IWorkbenchContri
const associatedEditors = distinct([ const associatedEditors = distinct([
...this.getUserAssociatedNotebookEditors(resource), ...this.getUserAssociatedNotebookEditors(resource),
...this.getContributedEditors(resource) ...this.getContributedEditors(resource)
], editor => editor.id); ], editor => editor.id).sort((a, b) => {
// if a content provider is exclusive, it has higher order
if (a.exclusive && b.exclusive) {
return 0;
}
if (a.exclusive) {
return -1;
}
if (b.exclusive) {
return 1;
}
return 0;
});
return associatedEditors.map(info => { return associatedEditors.map(info => {
return { return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册