mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-25 15:35:43 +01:00
Allow empty extension location for internal notebook contributions
No need to specify a fake location
This commit is contained in:
@@ -669,7 +669,7 @@ export interface WebviewExtensionDescription {
|
||||
|
||||
export interface NotebookExtensionDescription {
|
||||
readonly id: ExtensionIdentifier;
|
||||
readonly location: UriComponents;
|
||||
readonly location: UriComponents | undefined;
|
||||
}
|
||||
|
||||
export enum WebviewEditorCapabilities {
|
||||
|
||||
@@ -164,7 +164,7 @@ export class InteractiveDocumentContribution extends Disposable implements IWork
|
||||
};
|
||||
this._register(notebookService.registerNotebookController('interactive', {
|
||||
id: new ExtensionIdentifier('interactive.builtin'),
|
||||
location: URI.parse('interactive://test')
|
||||
location: undefined
|
||||
}, controller));
|
||||
|
||||
const info = notebookService.getContributedNotebookType('interactive');
|
||||
|
||||
@@ -689,7 +689,9 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
getNotebookProviderResourceRoots(): URI[] {
|
||||
const ret: URI[] = [];
|
||||
this._notebookProviders.forEach(val => {
|
||||
ret.push(URI.revive(val.extensionData.location));
|
||||
if (val.extensionData.location) {
|
||||
ret.push(URI.revive(val.extensionData.location));
|
||||
}
|
||||
});
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user