Introduce and adopt extensionLocation

This commit is contained in:
Alex Dima
2018-05-07 17:28:43 +02:00
parent 6025f1f45d
commit 0252ac49bc
23 changed files with 91 additions and 58 deletions

View File

@@ -415,7 +415,7 @@ export function createApiFactory(
return extHostOutputService.createOutputChannel(name);
},
createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel {
return extHostWebviews.createWebview(viewType, title, showOptions, options, extension.extensionFolderPath);
return extHostWebviews.createWebview(viewType, title, showOptions, options, extension.extensionLocation);
},
createTerminal(nameOrOptions: vscode.TerminalOptions | string, shellPath?: string, shellArgs?: string[]): vscode.Terminal {
if (typeof nameOrOptions === 'object') {
@@ -725,7 +725,7 @@ class Extension<T> implements vscode.Extension<T> {
constructor(extensionService: ExtHostExtensionService, description: IExtensionDescription) {
this._extensionService = extensionService;
this.id = description.id;
this.extensionPath = paths.normalize(description.extensionFolderPath, true);
this.extensionPath = paths.normalize(description.extensionLocation.fsPath, true);
this.packageJSON = description;
}
@@ -788,6 +788,7 @@ const nullExtensionDescription: IExtensionDescription = {
engines: undefined,
extensionDependencies: undefined,
extensionFolderPath: undefined,
extensionLocation: undefined,
isBuiltin: false,
main: undefined,
version: undefined