提交 7e7a71d7 编写于 作者: J Johannes Rieken

💄 more supportsBackup removal

上级 84a3473d
...@@ -462,7 +462,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo ...@@ -462,7 +462,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
// } // }
} }
async $registerNotebookProvider(extension: NotebookExtensionDescription, viewType: string, supportBackup: boolean, options: { async $registerNotebookProvider(extension: NotebookExtensionDescription, viewType: string, options: {
transientOutputs: boolean; transientOutputs: boolean;
transientMetadata: TransientMetadata; transientMetadata: TransientMetadata;
viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; }; viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; };
...@@ -470,7 +470,6 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo ...@@ -470,7 +470,6 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
let contentOptions = { transientOutputs: options.transientOutputs, transientMetadata: options.transientMetadata }; let contentOptions = { transientOutputs: options.transientOutputs, transientMetadata: options.transientMetadata };
const controller: IMainNotebookController = { const controller: IMainNotebookController = {
supportBackup,
get options() { get options() {
return contentOptions; return contentOptions;
}, },
......
...@@ -780,7 +780,7 @@ export interface INotebookDocumentShowOptions { ...@@ -780,7 +780,7 @@ export interface INotebookDocumentShowOptions {
export type INotebookCellStatusBarEntryDto = Dto<INotebookCellStatusBarEntry>; export type INotebookCellStatusBarEntryDto = Dto<INotebookCellStatusBarEntry>;
export interface MainThreadNotebookShape extends IDisposable { export interface MainThreadNotebookShape extends IDisposable {
$registerNotebookProvider(extension: NotebookExtensionDescription, viewType: string, supportBackup: boolean, options: { $registerNotebookProvider(extension: NotebookExtensionDescription, viewType: string, options: {
transientOutputs: boolean; transientOutputs: boolean;
transientMetadata: TransientMetadata; transientMetadata: TransientMetadata;
viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; }; viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; };
......
...@@ -328,7 +328,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN ...@@ -328,7 +328,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
}) })
: Disposable.None); : Disposable.None);
const supportBackup = !!provider.backupNotebook;
const viewOptionsFilenamePattern = options?.viewOptions?.filenamePattern const viewOptionsFilenamePattern = options?.viewOptions?.filenamePattern
.map(pattern => typeConverters.NotebookExclusiveDocumentPattern.from(pattern)) .map(pattern => typeConverters.NotebookExclusiveDocumentPattern.from(pattern))
...@@ -338,7 +337,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN ...@@ -338,7 +337,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
console.warn(`Notebook content provider view options file name pattern is invalid ${options?.viewOptions?.filenamePattern}`); console.warn(`Notebook content provider view options file name pattern is invalid ${options?.viewOptions?.filenamePattern}`);
} }
this._proxy.$registerNotebookProvider({ id: extension.identifier, location: extension.extensionLocation, description: extension.description }, viewType, supportBackup, { this._proxy.$registerNotebookProvider({ id: extension.identifier, location: extension.extensionLocation, description: extension.description }, viewType, {
transientOutputs: options?.transientOutputs || false, transientOutputs: options?.transientOutputs || false,
transientMetadata: options?.transientMetadata || {}, transientMetadata: options?.transientMetadata || {},
viewOptions: options?.viewOptions && viewOptionsFilenamePattern ? { displayName: options.viewOptions.displayName, filenamePattern: viewOptionsFilenamePattern, exclusive: options.viewOptions.exclusive || false } : undefined viewOptions: options?.viewOptions && viewOptionsFilenamePattern ? { displayName: options.viewOptions.displayName, filenamePattern: viewOptionsFilenamePattern, exclusive: options.viewOptions.exclusive || false } : undefined
......
...@@ -20,7 +20,6 @@ import { IRelativePattern } from 'vs/base/common/glob'; ...@@ -20,7 +20,6 @@ import { IRelativePattern } from 'vs/base/common/glob';
export const INotebookService = createDecorator<INotebookService>('notebookService'); export const INotebookService = createDecorator<INotebookService>('notebookService');
export interface IMainNotebookController { export interface IMainNotebookController {
supportBackup: boolean;
viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; }; viewOptions?: { displayName: string; filenamePattern: (string | IRelativePattern | INotebookExclusiveDocumentFilter)[]; exclusive: boolean; };
options: { transientOutputs: boolean; transientMetadata: TransientMetadata; }; options: { transientOutputs: boolean; transientMetadata: TransientMetadata; };
openNotebook(viewType: string, uri: URI, backupId?: string): Promise<{ data: NotebookDataDto, transientOptions: TransientOptions; }>; openNotebook(viewType: string, uri: URI, backupId?: string): Promise<{ data: NotebookDataDto, transientOptions: TransientOptions; }>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册