Search code examples
eclipseeclipse-plugineclipse-rcp

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. 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
  • I tried to search its id in Plugin-registry. 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.


Solution

  • This menu is added by the Eclipse RCP action builder org.eclipse.ui.internal.ide.WorkbenchActionBuilder in the addWorkingSetBuildActions:

    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.