Skip to main content


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 23:42 Go to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
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] Wed, 20 January 2010 03:09 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
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: Tue Apr 16 05:38:01 GMT 2024

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

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

Back to the top