From a03507c998ceae5d8cd19730aac025373cb4d872 Mon Sep 17 00:00:00 2001 From: Aditya Bist Date: Tue, 11 Jun 2019 16:12:41 -0700 Subject: [PATCH] added option to force reload extensions (#5990) --- extensions/cms/package.json | 1 + src/vs/platform/extensions/common/extensions.ts | 2 ++ .../services/extensions/electron-browser/extensionService.ts | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/extensions/cms/package.json b/extensions/cms/package.json index 7ff5f8e31d2b..5879cd110172 100644 --- a/extensions/cms/package.json +++ b/extensions/cms/package.json @@ -14,6 +14,7 @@ "activationEvents": [ "*" ], + "forceReload": true, "repository": { "type": "git", "url": "https://github.com/Microsoft/azuredatastudio.git" diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index a9f503039c56..acdca3c7a3e7 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -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 { diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index fe3aa6314c71..495a81cbfdfd 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -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