Skip to main content



      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 04:28 Go to next message
Eclipse UserFriend
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 08:30] by Moderator

Re: Desktop Extensions - Location of a Menu [message #1246040 is a reply to message #1244401] Fri, 14 February 2014 11:36 Go to previous messageGo to next message
Eclipse UserFriend
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 11:37] by Moderator

Re: Desktop Extensions - Location of a Menu [message #1246073 is a reply to message #1246040] Fri, 14 February 2014 12:38 Go to previous messageGo to next message
Eclipse UserFriend
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 01:24 Go to previous message
Eclipse UserFriend
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 Jul 04 14:40:18 EDT 2025

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

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

Back to the top