Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:41:37+00:00 2026-06-12T00:41:37+00:00

In my RCP program, I added a menu Demo in the workbenchwindow and a

  • 0

In my RCP program, I added a menu “Demo” in the workbenchwindow and a seperator “addition” below “Demo”. The code is below,

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

private ExampleAction exampleAction;

@Override
protected void makeActions(IWorkbenchWindow window) {
    // TODO Auto-generated method stub
    super.makeActions(window);

    exampleAction = new ExampleAction(window);      
}

@Override
protected void fillMenuBar(IMenuManager menuBar) {
    // TODO Auto-generated method stub
    super.fillMenuBar(menuBar);

    MenuManager demoMenu = new MenuManager("&Demo", "demo");
    demoMenu.add(exampleAction);
    demoMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));      
    menuBar.add(demoMenu);
}
 ..............

}

Now I want to contribute a submenu to the position “demo/additions”. I declare an actionSet extension point like below,

<extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            id="RCP-View-Example.actionSet"
            label="actionSet">
         <menu
               id="RCP-View-Example.menu"
               label="ActionSetMenu"
               path="demo/additions">
            <groupMarker
                  name="menuItem">
            </groupMarker>
         </menu>
         <action
               class="Action1"
               id="RCP-View-Example.action"
               label="Action"
               menubarPath="RCP-View-Example.menu/menuItem"
               style="push"
               toolbarPath="main/additions">
         </action>
      </actionSet>
   </extension>
   <extension
         point="org.eclipse.ui.actionSetPartAssociations">
      <actionSetPartAssociation
            targetID="RCP-View-Example.actionSet">
         <part
               id="my.view">
         </part>
      </actionSetPartAssociation>
   </extension>

I don’t see the menu is contributed and shown under “Demo” menu.
I modify the menu path from “path=”demo/additions” to “path=”org.eclipse.ui.main.menu/demo/additions”, I still don’t see it.

Could anyone help to see what’s wrong in my program?

I modify the menu path from path=”demo/additions to path=”additions”. I see the menu after “Demo” when the view is opened. But, after the view specified in actionSetPartAssociations extension point is closed, the menu is still there.
I expect the menu disappears when the view associated with it is closed.
What’s wrong in my program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:41:38+00:00Added an answer on June 12, 2026 at 12:41 am

    I think this note from the documentation might fit here:

    There is an implementation limitation which currently affects action sets. It is important to define the entire menu structure that is to be referenced within the action set. So, for example, if another action set defines a menu called “example”, it is not possible to rely on “example” existing. It is necessary to redefine the “example” menu in every action set that wishes to use it.

    So the problem is probably in your sub-menu path=”demo/additions”, which should include the complete path to the sub-menu. If you already have that Sub-Menu you can try Alt+Shift +F2 on an action inside that menu to find the Id for that menu and work from there.

    However if you are just starting with Menus, I’d recommend you to use the Command Framework right away. Even if you are using an already established Rich Client you can easily fit commands in wherever you like and the actionSets ExtensionPoint is deprecated in Eclipse Juno and newer. A good Commands tutorial can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an RCP program with a splash screen with a login. I'd like
with my RCP program I have the problem that I want to have more
I have to refactor a Java program created with Eclipse RCP. My predecessor handed
I have an Eclipse RCP based Application, in which I have a menu of
I created an RCP application that enables p2. The ui is added and updatesites
I have a properly functioning Eclipse RCP program which opens the org.eclipse.ui.intro extension to
We have the code for an Eclipse RCP application in an Eclipse workspace containing
Eclipse 3.7, trying to build my first RCP program. when I active the plugin
I have an Eclipse RCP application which uses some bindings from org.eclipse.ui.defaultAcceleratorConfiguration in addition
My RCP application's main menu appears in the global menu of Ubuntu 11.10, as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.