简体   繁体   English

Eclipse插件开发-在“项目”菜单下隐藏“构建工作集”

[英]Eclipse Plugin Development - Hide “Build Working Set” under Project menu

I successfully removed "Build All" "Build Project" "Clear..." "Build Automatically" and "Generate Java docs" from the PROJECT Menu. 我从PROJECT菜单中成功删除了“全部构建”,“构建项目”,“清除...”,“自动构建”和“生成Java文档”。 I am using Activity to hide them. 我正在使用“活动”将其隐藏。


But I am not able to remove "Build Working Set" at all. 但是我根本无法删除“构建工作集”。

  • I can't get its ID from Plugin-In Menu Spy 我无法从“插件菜单间谍”中获取其ID
  • I tried to search its id in Plugin-registry. 我试图在Plugin-registry中搜索其ID。 But I couldn't get anything useful. 但是我什么也得不到。

Please help me removing this from the project menu, as this command is not needed in my perspective. 请帮助我从项目菜单中删除此命令,因为我认为不需要此命令。

This menu is added by the Eclipse RCP action builder org.eclipse.ui.internal.ide.WorkbenchActionBuilder in the addWorkingSetBuildActions : 该菜单由Eclipse RCP操作构建器org.eclipse.ui.internal.ide.WorkbenchActionBuilderaddWorkingSetBuildActions

private void addWorkingSetBuildActions(MenuManager menu) {
    buildWorkingSetMenu = new MenuManager(IDEWorkbenchMessages.Workbench_buildSet);
    IContributionItem workingSetBuilds = new BuildSetMenu(window,
            getActionBarConfigurer());
    buildWorkingSetMenu.add(workingSetBuilds);
    menu.add(buildWorkingSetMenu);
}

Unfortunately the MenuManager constructor this is using doesn't specify an id, so I don't think you can use an activity to suppress it. 不幸的是,正在使用的MenuManager构造函数没有指定id,因此我认为您不能使用活动来禁止它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM