Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » Dynamically add ViewMenu
Dynamically add ViewMenu [message #1278422] Thu, 27 March 2014 06:15 Go to next message
Eclipse UserFriend
Hi all,
I want to Dynamically add ViewMenu to Part from PartDescriptor
Here is my code in Xtend:
@Inject
MPart part

...

descriptor = modelService.getPartDescriptor(id)
...
val menuCopy = EcoreUtil.copyAll(descriptor.menus)
part.menus.clear
part.menus += menuCopy

but after adding menus to part nothing happen.
What is right way to add ViewMenu to Part dynamically?

Best regards,
Dmitriy.
Re: Dynamically add ViewMenu [message #1278432 is a reply to message #1278422] Thu, 27 March 2014 06:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Adding to the descriptor will only have an effect when the part is
opened the next time from this PartDescriptor. To show up as a ViewMenu
you also have to have the Menu-Entry tagged with "ViewMenu".

You need to update the menu of the current part to have an immediate
effect on the current part.

Looking at the code I see that we are not yet tracking the update to the
part menu currently so adding a ViewMenu entry dynamically we are not
reacting on that change.

So file a bugzilla and we'll fix this in 1.0.0!

Tom

On 27.03.14 11:15, Dmitriy Shishkin wrote:
> Hi all,
> I want to Dynamically add ViewMenu to Part from PartDescriptor
> Here is my code in Xtend:
>
> @Inject
> MPart part
>
> ..
>
> descriptor = modelService.getPartDescriptor(id)
> ..
> val menuCopy = EcoreUtil.copyAll(descriptor.menus)
> part.menus.clear
> part.menus += menuCopy
>
> but after adding menus to part nothing happen.
> What is right way to add ViewMenu to Part dynamically?
>
> Best regards,
> Dmitriy.
Re: Dynamically add ViewMenu [message #1278452 is a reply to message #1278422] Thu, 27 March 2014 07:03 Go to previous message
Eclipse UserFriend
Thank for quick reply)

Bug 431338

Best regards,
Dmitriy
Previous Topic:Tool for Luna 4.4-I 2014-03-18
Next Topic:Problems in Installing e(fx)clipse In Eclipse Kepler
Goto Forum:
  


Current Time: Thu Apr 24 04:14:23 EDT 2025

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

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

Back to the top