fixed:移除插件侧边栏中,筛选按钮下的kylinIDETeam筛选菜单.

This commit is contained in:
chriswang521 2024-06-13 15:09:22 +08:00 committed by wangpenglong
parent e3e4607fce
commit 53a365cad3
1 changed files with 38 additions and 20 deletions

View File

@ -1028,27 +1028,29 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@recentlyPublished '))
});
const extensionsKylinCategoryFilterSubMenu = new MenuId('extensionsKylinCategoryFilterSubMenu');
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, <ISubmenuItem>{
submenu: extensionsKylinCategoryFilterSubMenu,
title: localize('filter by kylin category', "Kylin-Code Category"),
when: CONTEXT_HAS_GALLERY,
group: '2_categories',
order: 1,
});
// remove the old filter start by kylinIdeTeam{
// const extensionsKylinCategoryFilterSubMenu = new MenuId('extensionsKylinCategoryFilterSubMenu');
// MenuRegistry.appendMenuItem(extensionsFilterSubMenu, <ISubmenuItem>{
// submenu: extensionsKylinCategoryFilterSubMenu,
// title: localize('filter by kylin category', "Kylin-Code Category"),
// when: CONTEXT_HAS_GALLERY,
// group: '2_categories',
// order: 1,
// });
Object.entries(extensionKylinCategories).forEach(([categoryKey, category], index) => {
this.registerExtensionAction({
id: `extensions.actions.searchByCategory.${categoryKey}`,
title: category,
menu: [{
id: extensionsKylinCategoryFilterSubMenu,
when: CONTEXT_HAS_GALLERY,
order: index,
}],
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, `@tag:"${categoryKey.toLowerCase()}"`))
});
});
// Object.entries(extensionKylinCategories).forEach(([categoryKey, category], index) => {
// this.registerExtensionAction({
// id: `extensions.actions.searchByCategory.${categoryKey}`,
// title: category,
// menu: [{
// id: extensionsKylinCategoryFilterSubMenu,
// when: CONTEXT_HAS_GALLERY,
// order: index,
// }],
// run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, `@tag:"${categoryKey.toLowerCase()}"`))
// });
// });
// remove the old filter end by kylinIdeTeam}
const extensionsCategoryFilterSubMenu = new MenuId('extensionsCategoryFilterSubMenu');
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, <ISubmenuItem>{
@ -1241,6 +1243,22 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
}
});
// this.registerExtensionAction({
// id: 'workbench.extensions.action.installKylinIdeTeamExtensions',
// title: localize('installKylinIdeTeamExtensions', "Install KylinIDETeam Extensions"),
// icon: installWorkspaceRecommendedIcon,
// menu: {
// id: MenuId.ViewTitle,
// when: ContextKeyExpr.equals('view', WORKSPACE_KYLINIDETEAM_VIEW_ID),
// group: 'navigation',
// order: 1
// },
// run: async (accessor: ServicesAccessor) => {
// const view = accessor.get(IViewsService).getActiveViewWithId(WORKSPACE_KYLINIDETEAM_VIEW_ID) as IWorkspaceKylinIDETeamExtensionsView;
// return view.installKylinIdeTeamExtensions();
// }
// });
this.registerExtensionAction({
id: 'workbench.extensions.action.installWorkspaceRecommendedExtensions',
title: localize('installWorkspaceRecommendedExtensions', "Install Workspace Recommended Extensions"),