Skip to content

Commit

Permalink
added option to force reload extensions (microsoft#5990)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist authored Jun 11, 2019
1 parent f1e38b6 commit a03507c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"activationEvents": [
"*"
],
"forceReload": true,
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/azuredatastudio.git"
Expand Down
2 changes: 2 additions & 0 deletions src/vs/platform/extensions/common/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a03507c

Please sign in to comment.