mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 06:25:37 +00:00
Remove extension folder path
Any webviews serialized in the past three months should now be using extensionLocation instead
This commit is contained in:
parent
bef7861415
commit
3ba2cf8716
1 changed files with 2 additions and 13 deletions
|
@ -13,10 +13,6 @@ interface SerializedWebview {
|
|||
readonly viewType: string;
|
||||
readonly title: string;
|
||||
readonly options: WebviewInputOptions;
|
||||
/**
|
||||
* compatibility with previous versions
|
||||
*/
|
||||
readonly extensionFolderPath?: string;
|
||||
readonly extensionLocation: string;
|
||||
readonly state: any;
|
||||
}
|
||||
|
@ -53,18 +49,11 @@ export class WebviewEditorInputFactory implements IEditorInputFactory {
|
|||
}
|
||||
|
||||
public deserialize(
|
||||
instantiationService: IInstantiationService,
|
||||
_instantiationService: IInstantiationService,
|
||||
serializedEditorInput: string
|
||||
): WebviewEditorInput {
|
||||
const data: SerializedWebview = JSON.parse(serializedEditorInput);
|
||||
let extensionLocation: URI;
|
||||
if (typeof data.extensionLocation === 'string') {
|
||||
extensionLocation = URI.parse(data.extensionLocation);
|
||||
}
|
||||
if (typeof data.extensionFolderPath === 'string') {
|
||||
// compatibility with previous versions
|
||||
extensionLocation = URI.file(data.extensionFolderPath);
|
||||
}
|
||||
const extensionLocation = URI.parse(data.extensionLocation);
|
||||
return this._webviewService.reviveWebview(data.viewType, data.title, data.state, data.options, extensionLocation);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue