diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index ecc7c8dc..9e829b02 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -118,9 +118,9 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, { MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, { submenu: MenuId.MenubarProjectMenu, title: { - value: (platform.language == 'zh-cn' ? '项目' : 'Project'), + value: (platform.language === 'zh-cn' ? '项目' : 'Project'), original: 'Project', - mnemonicTitle: (platform.language == 'zh-cn' ? '项目' : 'Project') + mnemonicTitle: (platform.language === 'zh-cn' ? '项目' : 'Project') }, order: 10 }); @@ -222,14 +222,14 @@ export abstract class MenubarControl extends Disposable { isenable = false; } if (isenable) { - if (extension.identifier.id = "kylin.vscode-create-project") { + if (extension.identifier.id === "kylin.vscode-create-project") { console.log("kylin.vscode-create-project is enable " + extension.identifier.id); this.hasCreateProjectExternsion = true; this.setupMainMenu(); this.doUpdateMenubar(true); } } else { - if (extension.identifier.id = "kylin.vscode-create-project") { + if (extension.identifier.id === "kylin.vscode-create-project") { console.log("kylin.vscode-create-project is disable " + extension.identifier.id); this.hasCreateProjectExternsion = false; this.setupMainMenu(); @@ -253,8 +253,8 @@ export abstract class MenubarControl extends Disposable { const [, mainMenuActions] = this.mainMenu.getActions()[0]; for (const mainMenuAction of mainMenuActions) { if (mainMenuAction instanceof SubmenuItemAction && typeof mainMenuAction.item.title !== 'string') { - if (mainMenuAction.item.title.original == "Project") { - if (this.hasCreateProjectExternsion == false) { + if (mainMenuAction.item.title.original === "Project") { + if (this.hasCreateProjectExternsion === false) { break; } } diff --git a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts index 1040b35b..77459072 100644 --- a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts @@ -74,6 +74,7 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench this._register(this.extensionsManager.onDidChangeExtensions(({ added, removed }) => this._onDidChangeExtensions(added, removed))); uninstallDisposable.dispose(); } + this._onEnablementChanged.fire(this.extensionsManager.extensions); }); this._register(this.globalExtensionEnablementService.onDidChangeEnablement(({ extensions, source }) => this._onDidChangeGloballyDisabledExtensions(extensions, source)));