Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » add an action to submenu
add an action to submenu [message #1734466] Wed, 08 June 2016 14:33 Go to next message
Muniraj K A is currently offline Muniraj K AFriend
Messages: 11
Registered: May 2016
Junior Member
I need to add a new command/action to an already existing context menu. Facing problem in uploading the screenshot so I am explaining the problem in words- if we open any project in 'Artop' perspective, we get a package by name 'AUTOSAR' in the list of resources of the project. On right clicking 'AUTOSAR' package(ArPackageImpl object), a context menu with various commands like new child, open in editor, open references etc. is opened.When right clicked on the 'new child' option, there is a submenu opening with the options annotations, ar packages, blueprint policies etc.

The issue now is, I am unable to find the ID of this 'submenu' to add a new command(or action) to it.

using plugin spy, it showed - The active contribution location URI: menu:null?after=additions The active contribution item class: CreateChildAction The contributing plug-in: org.eclipse.emf.edit.ui (2.10.2.v20150123-0452).

Thinking that this submenu does not have an id, I debugged the program to add it programmatically. I found getNewChildDescriptors() method in org.eclipse.sphinx.emf.explorer.actions.providers.BasicModelEditActionProvider class doing the trick(dint understand the logic though). Could anybody please help me achieve this task either by overriding this method or using any extention point.
Re: add an action to submenu [message #1734511 is a reply to message #1734466] Thu, 09 June 2016 05:27 Go to previous messageGo to next message
Muniraj K A is currently offline Muniraj K AFriend
Messages: 11
Registered: May 2016
Junior Member
not able to understand what getNewChildDescriptors() is doing. How child descriptors and the corresponding actions are linked?
Re: add an action to submenu [message #1734521 is a reply to message #1734511] Thu, 09 June 2016 07:09 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

Le 09/06/2016 à 07:27, Muniraj K A a écrit :
> not able to understand what getNewChildDescriptors() is doing. How child
> descriptors and the corresponding actions are linked?
>

You mention emf.edit and sphinx in your previous message, your questions
are not related to Sirius.

It looks like you should go to the Sphinx/EMF forum to ask your question:
.. Forum Sphinx: https://www.eclipse.org/forums/index.php/f/171/
.. Forum EMF: https://www.eclipse.org/forums/index.php/f/108/


Regards

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: add an action to submenu [message #1734553 is a reply to message #1734521] Thu, 09 June 2016 10:43 Go to previous message
Muniraj K A is currently offline Muniraj K AFriend
Messages: 11
Registered: May 2016
Junior Member
ya this is a different question, not related to Sirius. I will now post it in Sphinx/EMF forum. thanks

[Updated on: Thu, 09 June 2016 10:43]

Report message to a moderator

Previous Topic:Unable to Resize Vertical Stacked Containers
Next Topic:How to add nodes to containers via layers?
Goto Forum:
  


Current Time: Tue Apr 23 14:43:19 GMT 2024

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

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

Back to the top