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 #508720] 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 #508735 is a reply to message #508720] Tue, 19 January 2010 22:09 Go to previous messageGo to next 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
Re: Showing menu in e4 application [message #508959 is a reply to message #508735] Wed, 20 January 2010 16:10 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Hi Yves,

thanks for the answer; it works now with your help. Sorry, I oversaw the obvious difference.

I'll update soon my e4 tutorial so that other do not have to make the same error. Once I updated it I'll post to this thread.

http://www.vogella.de/articles/EclipseE4/article.html

Best regards, Lars
Re: Showing menu in e4 application [message #508963 is a reply to message #508959] Wed, 20 January 2010 11:46 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:hj7rg0$6qm$1@build.eclipse.org...
> Hi Yves,
>
> thanks for the answer; it works now with your help. Sorry, I oversaw the
> obvious difference.
> I'll update soon my e4 tutorial so that other do not have to make the same
> error. Once I updated it I'll post to this thread.
>
> http://www.vogella.de/articles/EclipseE4/article.html
>
I'll update the wizard today to have an example with Perspectives, ToolBar
and Menu together.

yves
Re: Showing menu in e4 application [message #508984 is a reply to message #508963] Wed, 20 January 2010 14:44 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Thanks again. I updated:

http://www.vogella.de/articles/EclipseE4/article.html


On 20.01.2010 13:25, Yves YANG wrote:
> "Lars Vogel"<Lars.Vogel@gmail.com> wrote in message
> news:hj7rg0$6qm$1@build.eclipse.org...
>> Hi Yves,
>>
>> thanks for the answer; it works now with your help. Sorry, I oversaw the
>> obvious difference.
>> I'll update soon my e4 tutorial so that other do not have to make the same
>> error. Once I updated it I'll post to this thread.
>>
>> http://www.vogella.de/articles/EclipseE4/article.html
>>
> I'll update the wizard today to have an example with Perspectives, ToolBar
> and Menu together.
>
> yves
>
>
Re: Showing menu in e4 application [message #567953 is a reply to message #508735] Wed, 20 January 2010 16:10 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Hi Yves,

thanks for the answer; it works now with your help. Sorry, I oversaw the obvious difference.

I'll update soon my e4 tutorial so that other do not have to make the same error. Once I updated it I'll post to this thread.

http://www.vogella.de/articles/EclipseE4/article.html

Best regards, Lars
Re: Showing menu in e4 application [message #567975 is a reply to message #567953] Wed, 20 January 2010 16:25 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:hj7rg0$6qm$1@build.eclipse.org...
> Hi Yves,
>
> thanks for the answer; it works now with your help. Sorry, I oversaw the
> obvious difference.
> I'll update soon my e4 tutorial so that other do not have to make the same
> error. Once I updated it I'll post to this thread.
>
> http://www.vogella.de/articles/EclipseE4/article.html
>
I'll update the wizard today to have an example with Perspectives, ToolBar
and Menu together.

yves
Re: Showing menu in e4 application [message #567996 is a reply to message #567975] Wed, 20 January 2010 19:36 Go to previous message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Thanks again. I updated:

http://www.vogella.de/articles/EclipseE4/article.html


On 20.01.2010 13:25, Yves YANG wrote:
> "Lars Vogel"<Lars.Vogel@gmail.com> wrote in message
> news:hj7rg0$6qm$1@build.eclipse.org...
>> Hi Yves,
>>
>> thanks for the answer; it works now with your help. Sorry, I oversaw the
>> obvious difference.
>> I'll update soon my e4 tutorial so that other do not have to make the same
>> error. Once I updated it I'll post to this thread.
>>
>> http://www.vogella.de/articles/EclipseE4/article.html
>>
> I'll update the wizard today to have an example with Perspectives, ToolBar
> and Menu together.
>
> yves
>
>
Previous Topic:Showing menu in e4 application
Next Topic:Problems extending the application model with PartDescriptor's.
Goto Forum:
  


Current Time: Thu Aug 21 08:17:00 EDT 2014

Powered by FUDForum. Page generated in 0.02029 seconds