registerNotebookCellStatusBarItemProvider should use viewType instead of NotebookSelector

Fix #122347
This commit is contained in:
Rob Lourens
2021-05-07 15:23:19 -07:00
parent 450e5d164e
commit 4a76f0b19a
9 changed files with 40 additions and 59 deletions

View File

@@ -10,7 +10,6 @@ import { DisposableStore, dispose, IDisposable } from 'vs/base/common/lifecycle'
import { URI } from 'vs/base/common/uri';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { INotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/common/notebookCellStatusBarService';
import { NotebookSelector } from 'vs/workbench/contrib/notebook/common/notebookSelector';
import { INotebookCellStatusBarItemProvider, INotebookContributionData, NotebookDataDto, TransientCellMetadata, TransientDocumentMetadata, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { INotebookContentProvider, INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
import { ExtHostContext, ExtHostNotebookShape, IExtHostContext, MainContext, MainThreadNotebookShape, NotebookExtensionDescription } from '../common/extHost.protocol';
@@ -131,7 +130,7 @@ export class MainThreadNotebooks implements MainThreadNotebookShape {
}
}
async $registerNotebookCellStatusBarItemProvider(handle: number, eventHandle: number | undefined, selector: NotebookSelector): Promise<void> {
async $registerNotebookCellStatusBarItemProvider(handle: number, eventHandle: number | undefined, viewType: string): Promise<void> {
const that = this;
const provider: INotebookCellStatusBarItemProvider = {
async provideCellStatusBarItems(uri: URI, index: number, token: CancellationToken) {
@@ -145,7 +144,7 @@ export class MainThreadNotebooks implements MainThreadNotebookShape {
}
};
},
selector: selector
viewType
};
if (typeof eventHandle === 'number') {