adding new action to submenu [message #1734554] |
Thu, 09 June 2016 10:45 |
Muniraj K A 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.
|
|
|
Powered by
FUDForum. Page generated in 0.02507 seconds