Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Fill Menu with RCP and e4
Fill Menu with RCP and e4 [message #857362] Thu, 26 April 2012 13:29 Go to next message
Philippe Fry is currently offline Philippe FryFriend
Messages: 6
Registered: April 2012
Junior Member
Hello,

I'm working on an application which mix RCP and e4 technologies. (There is a Appliation class, ApplicationWorkbenchAdvisor class, ApplicationWorkbenchWindowAdvisor class, ApplicationActionBarAdvisor class and a LegacyIDE.e4xmi)

In the ApplicationActionBarAdvisor i fill the main menu like this :


@Override
protected void fillMenuBar(IMenuManager menuBar) {
final MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
menuBar.add(fileMenu);
fileMenu.add(exitAction);
}


In the e4 application model i have a Menucontribution (parentId = org.eclipse.ui.main.menu)

<menuContributions xmi:id="_TKNd8I-GEeG2MIA3k-dHyw" parentId="org.eclipse.ui.main.menu">
<children xsi:type="menu:Menu" xmi:id="_YH-YcI-GEeG2MIA3k-dHyw" elementId="test2" label="Views">
<children xsi:type="menu:HandledMenuItem" xmi:id="_aemRkI-GEeG2MIA3k-dHyw" elementId="test2.showview" label="Show View" command="e4.show.view"/>
</children>
</menuContributions>

When i launch the application I have only menu items defined in my e4 application model (The menu "File" is not visible).

My question is How i can begin to fill the main windows menu in the ApplicationActionBarAdvisor the continue to populate it with the e4 application model ?. I'm sure i misunderstand something.

Thanks a lot.
Re: Fill Menu with RCP and e4 [message #857366 is a reply to message #857362] Thu, 26 April 2012 13:32 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What application are you launching? Is it your RCP application? Or the e4 application?

PW


Re: Fill Menu with RCP and e4 [message #857377 is a reply to message #857366] Thu, 26 April 2012 13:39 Go to previous message
Philippe Fry is currently offline Philippe FryFriend
Messages: 6
Registered: April 2012
Junior Member
I launch the RCP Application class : (public class Application implements IApplication)

in my plugin.xml :
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="fr.[...].application.Application">
</run>
</application>
</extension>
[...]
<extension
id="product"
point="org.eclipse.core.runtime.products">

<product
application="fr.[...].application.application"
[...]
<property
name="applicationXMI"
value="application/LegacyIDE.e4xmi">
</property>

[Updated on: Thu, 26 April 2012 13:56]

Report message to a moderator

Previous Topic:XWT/WindowBuilder - Custom composite problem - replicate/double copy of component
Next Topic:Editor and popup menu
Goto Forum:
  


Current Time: Fri Nov 28 17:23:33 GMT 2014

Powered by FUDForum. Page generated in 0.01578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software