diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index d4aca7a0220..59e66d558df 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1672,6 +1672,11 @@ declare module 'vscode' { * @return The uri of the resource. */ asExtensionUri(relativePath: string): Uri; + + /** + * + */ + readonly extensionUri: Uri; } export interface Extension { @@ -1682,6 +1687,11 @@ declare module 'vscode' { * @return The uri of the resource. */ asExtensionUri(relativePath: string): Uri; + + /** + * + */ + readonly extensionUri: Uri; } //#endregion diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index cb57cc82270..c190ad1c7c4 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -1015,6 +1015,7 @@ class Extension implements vscode.Extension { private _identifier: ExtensionIdentifier; readonly id: string; + readonly extensionUri: URI; readonly extensionPath: string; readonly packageJSON: IExtensionDescription; readonly extensionKind: vscode.ExtensionKind; @@ -1024,6 +1025,7 @@ class Extension implements vscode.Extension { this._originExtensionId = originExtensionId; this._identifier = description.identifier; this.id = description.identifier.value; + this.extensionUri = description.extensionLocation; this.extensionPath = path.normalize(originalFSPath(description.extensionLocation)); this.packageJSON = description; this.extensionKind = kind; diff --git a/src/vs/workbench/api/common/extHostExtensionService.ts b/src/vs/workbench/api/common/extHostExtensionService.ts index 197aa88c85c..904c5afd8c8 100644 --- a/src/vs/workbench/api/common/extHostExtensionService.ts +++ b/src/vs/workbench/api/common/extHostExtensionService.ts @@ -366,6 +366,7 @@ export abstract class AbstractExtHostExtensionService implements ExtHostExtensio globalState, workspaceState, subscriptions: [], + get extensionUri() { return extensionDescription.extensionLocation; }, get extensionPath() { return extensionDescription.extensionLocation.fsPath; }, get storagePath() { return that._storagePath.workspaceValue(extensionDescription); }, get globalStoragePath() { return that._storagePath.globalValue(extensionDescription); },