added option to force reload extensions (#5990)

This commit is contained in:
Aditya Bist
2019-06-11 16:12:41 -07:00
committed by GitHub
parent f1e38b655e
commit a03507c998
3 changed files with 8 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
"activationEvents": [
"*"
],
"forceReload": true,
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/azuredatastudio.git"

View File

@@ -236,6 +236,8 @@ export interface IExtensionDescription extends IExtensionManifest {
readonly isUnderDevelopment: boolean;
readonly extensionLocation: URI;
enableProposedApi?: boolean;
// {{ SQL CARBON EDIT }}
readonly forceReload?: boolean;
}
export function isLanguagePackExtension(manifest: IExtensionManifest): boolean {

View File

@@ -305,6 +305,11 @@ export class ExtensionService extends Disposable implements IExtensionService {
return false;
}
// {{ SQL CARBON EDIT }}
if (extension.forceReload) {
return false;
}
const extensionDescription = this._registry.getExtensionDescription(extension.identifier);
if (extensionDescription) {
// ignore adding an extension which is already running and cannot be removed