Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Desktop Extensions - Location of a Menu(How to contribute with a Sub-Menu)
Desktop Extensions - Location of a Menu [message #1244401] Wed, 12 February 2014 09:28 Go to next message
João Rebelo is currently offline João RebeloFriend
Messages: 28
Registered: December 2013
Junior Member
Hi,

I was testing the DesktopExtension mechanisms which work fairly nice for outlines and Menus at least!
Unfortunately I can't find any reference on how to contribute with a sub menu. Is it possible?

Regards
João

[Updated on: Wed, 12 February 2014 13:30]

Report message to a moderator

Re: Desktop Extensions - Location of a Menu [message #1246040 is a reply to message #1244401] Fri, 14 February 2014 16:36 Go to previous messageGo to next message
Silvio Kohler is currently offline Silvio KohlerFriend
Messages: 5
Registered: March 2013
Junior Member
Hi Joao

You can use the extension point org.eclipse.scout.rt.extension.client.menus to add sub menus to existing menus.


  • Add org.eclipse.scout.rt.extension.client.menus to the dependencies of your plugin.
  • Add an extension to the extension point org.eclipse.scout.rt.extension.client.menus.
  • Select menuContribution.
  • Select the menu you want to add.
  • Use parentMenu to select the menu you want to attach the new menu to.


The new menu...
should extend org.eclipse.scout.rt.client.ui.action.menu.AbstractMenu.

The parent menu...
has to extend org.eclipse.scout.rt.extension.client.ui.action.menu.AbstractExtensibleMenu. This class has the method injectActionNodesInternal which adds the new menu.
Thus, a menu that does not extend AbstractExtensibleMenu cannot be extended using the extension point. This has to be considered when programming a core application that is intended to be extended.

Cheers

Silvio

[Updated on: Fri, 14 February 2014 16:37]

Report message to a moderator

Re: Desktop Extensions - Location of a Menu [message #1246073 is a reply to message #1246040] Fri, 14 February 2014 17:38 Go to previous messageGo to next message
João Rebelo is currently offline João RebeloFriend
Messages: 28
Registered: December 2013
Junior Member
Hi Silvio,

Thanks for help!
Just tested it in SWT rendering and its working fine!

Unfortunately for RAP it doesn't seem to work, although the DesktopExtension works.
Is it something not working on RAP? or may I be doing something wrong?

Regards
João
Re: Desktop Extensions - Location of a Menu [message #1252368 is a reply to message #1246073] Fri, 21 February 2014 06:24 Go to previous message
Silvio Kohler is currently offline Silvio KohlerFriend
Messages: 5
Registered: March 2013
Junior Member
Hi Joao

It should work for RAP and SWT with exactly the same code. I don't know about an issue on RAP.

In RAP, it looks like this (added the menu "Info" to the existing menu "File"):

index.php/fa/17517/0/

I checked it on Kepler and Luna M5 Release.
Which release are you using? Is the plugin contributing the new menu active?

Greets
Silvio
Previous Topic:Authentication and Authorization in RAP
Next Topic:How to propagate Eclipse 4 IStylingEngine in Scout
Goto Forum:
  


Current Time: Fri Apr 19 15:17:29 GMT 2024

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

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

Back to the top