forked from openkylin/kylin-code
修复创建工程插件菜单栏的初始化相关问题
This commit is contained in:
parent
9be37b0d12
commit
6dfcd835c4
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue