Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Showing menu in e4 application
Showing menu in e4 application [message #567886] Tue, 19 January 2010 18:42 Go to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Hi,

I want to add a menu to my minimal e4 application but the menu is not displayed.

I compared with the contact demo (which I also reduced for this purpose) but I cannot see any difference.

The Application.xmi is like the following.

<?xml version="1.0" encoding="ASCII"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2008/UIModel" id="Application">
<children xsi:type="application:Window" label="My first e4 application" iconURI="" tooltip="" id="Window" onTop="true" width="200" height="200">
<children xsi:type="application:Part" id="View1" style="" URI=" platform:/plugin/de.vogella.e4.rcp.first/de.vogella.e4.rcp.f irst.parts.View1 " containerData="" label="Hallo" tooltip=""/>
<children xsi:type="application:Menu" id="">
<children xsi:type="application:MenuItem" id="" label="File">
<children xsi:type="application:DirectMenuItem" URI=" platform:/plugin/de.vogella.e4.rcp.first/de.vogella.e4.rcp.f irst.handlers.ExitHandler " label="Exit"/>
</children>
</children>
</children>
</application:Application>


Advice would be welcome.

Best regards, Lars
Re: Showing menu in e4 application [message #567925 is a reply to message #567886] Tue, 19 January 2010 22:09 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
Have you used the e4 Wizard to create an e4 application project? If you use
it, you will not run into this problem.

The problem is the menu is created in children. It should be mainMenu.
<mainMenu>
<children xsi:type="application:MenuItem" label="File">
</children>
</mainMenu>

I suppose you have created using EMF Reflective Editor.

Regards
Yves
"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:hj5g0d$bst$1@build.eclipse.org...
> Hi,
>
> I want to add a menu to my minimal e4 application but the menu is not
> displayed.
> I compared with the contact demo (which I also reduced for this purpose)
> but I cannot see any difference.
> The Application.xmi is like the following.
>
> <?xml version="1.0" encoding="ASCII"?>
> <application:Application xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:application="http://www.eclipse.org/ui/2008/UIModel"
> id="Application">
> <children xsi:type="application:Window" label="My first e4 application"
> iconURI="" tooltip="" id="Window" onTop="true" width="200" height="200">
> <children xsi:type="application:Part" id="View1" style="" URI="
> platform:/plugin/de.vogella.e4.rcp.first/de.vogella.e4.rcp.f
> irst.parts.View1 " containerData="" label="Hallo" tooltip=""/>
> <children xsi:type="application:Menu" id="">
> <children xsi:type="application:MenuItem" id="" label="File">
> <children xsi:type="application:DirectMenuItem" URI="
> platform:/plugin/de.vogella.e4.rcp.first/de.vogella.e4.rcp.f
> irst.handlers.ExitHandler " label="Exit"/>
> </children>
> </children>
> </children>
> </application:Application>
>
>
> Advice would be welcome.
>
> Best regards, Lars
Previous Topic:How to create a new Part Dynamically
Next Topic:Showing menu in e4 application
Goto Forum:
  


Current Time: Thu Jul 24 21:46:30 EDT 2014

Powered by FUDForum. Page generated in 0.01706 seconds