Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » EMenuService Discouraged access(What should be used instead of EMenuService)
EMenuService Discouraged access [message #1358951] Fri, 16 May 2014 05:35 Go to next message
Stefan Weiser is currently offline Stefan WeiserFriend
Messages: 55
Registered: February 2012
Member
I configure Popup-Menus in the e4xmi and bind them with the EMenuService to tables, trees and other controls. This works fine as long as I don't dispose such a control with a defined popup menu from the e4xmi.

But the EMenuService is marked as discouraged and should not be referenced. So what should be used instead, when I want to use the popup menus from the e4xmi? I researched several tutorials and forums but didn't find another opportunity.
Re: EMenuService Discouraged access [message #1358984 is a reply to message #1358951] Fri, 16 May 2014 05:59 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
On 16.05.14 07:35, Stefan Weiser wrote:
> I configure Popup-Menus in the e4xmi and bind them with the EMenuService
> to tables, trees and other controls. This works fine as long as I don't
> dispose such a control with a defined popup menu from the e4xmi.
> But the EMenuService is marked as discouraged and should not be
> referenced. So what should be used instead, when I want to use the popup
> menus from the e4xmi? I researched several tutorials and forums but
> didn't find another opportunity.

The reason it is 4.3 is that we didn't want to make it API and this was
a good choice because we had to relocate it in 4.4 where it was promoted
to be API.

So yes EMenuService is what you are looking for but be prepared to make
a small adjustment when switching to Luna!

Tom
Re: EMenuService Discouraged access [message #1359018 is a reply to message #1358984] Fri, 16 May 2014 06:19 Go to previous messageGo to next message
Stefan Weiser is currently offline Stefan WeiserFriend
Messages: 55
Registered: February 2012
Member
It's nice to read that the EMenuService will become API.

I have an additional question:

When I register a context menu to a widget (e.g. Tree), and after some time this widget gets disposed and recreated again, the menu is not visible any more, if I register it again. Is this a bug or do I have to guarantee that the widgets stay alive to keep the context menu?

This is a tricky task, if you have tables or trees with changing columns. This could be a bit easier by disposing and recreating them.
Re: EMenuService Discouraged access [message #1359076 is a reply to message #1359018] Fri, 16 May 2014 06:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
This certainly sounds like a bug but looking at the code I don't see why
you should not get a menu when disposing & recreating

Tom

On 16.05.14 08:19, Stefan Weiser wrote:
> It's nice to read that the EMenuService will become API.
> I have an additional question:
>
> When I register a context menu to a widget (e.g. Tree), and after some
> time this widget gets disposed and recreated again, the menu is not
> visible any more, if I register it again. Is this a bug or do I have to
> guarantee that the widgets stay alive to keep the context menu?
> This is a tricky task, if you have tables or trees with changing
> columns. This could be a bit easier by disposing and recreating them.
Re: EMenuService Discouraged access [message #1359143 is a reply to message #1359076] Fri, 16 May 2014 07:35 Go to previous message
Stefan Weiser is currently offline Stefan WeiserFriend
Messages: 55
Registered: February 2012
Member
OK, then I will debug into the MenuService and have a look.

Thanks for the help.

LG
Previous Topic:Exporting Eclipse Product to Linux Broken
Next Topic:[Resolved] Wrong merged application model when using compatibility layer
Goto Forum:
  


Current Time: Tue Mar 19 03:33:58 GMT 2024

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

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

Back to the top