|
Re: Customizing EMF context menu [message #1751521 is a reply to message #1751228] |
Wed, 11 January 2017 06:45 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
There are various ways to contribute to menus via the plugin.xml. The older approach, using actions, is to use the org.eclipse.ui.popupMenus extension point. The newer way, using commands and handlers, is to use the org.eclipse.ui.menus extension point.
I see createRemoveCommand being called when the editor's selection changesGenModelItemProvider(ItemProviderAdapter).createRemoveCommand(EditingDomain, EObject, EStructuralFeature, Collection<?>) line: 1157
GenModelItemProvider(ItemProviderAdapter).factorRemoveCommand(EditingDomain, CommandParameter) line: 1362
GenModelItemProvider(ItemProviderAdapter).createCommand(Object, EditingDomain, Class<Command>, CommandParameter) line: 1015
EcoreEditor$6(AdapterFactoryEditingDomain).createCommand(Class<Command>, CommandParameter) line: 462
EcoreEditor$6(AdapterFactoryEditingDomain).createCommand(Class<Command>, CommandParameter) line: 516
RemoveCommand.create(EditingDomain, Object, Object, Collection<?>) line: 93
RemoveCommand.create(EditingDomain, Collection<?>) line: 85
DeleteCommand.prepareCommand() line: 104
DeleteCommand.prepare() line: 98
DeleteCommand(AbstractCommand).canExecute() line: 108
DeleteAction(CommandActionHandler).updateSelection(IStructuredSelection) line: 99
DeleteAction(BaseSelectionListenerAction).selectionChanged(IStructuredSelection) line: 124
DeleteAction(BaseSelectionListenerAction).selectionChanged(SelectionChangedEvent) line: 138
EcoreEditor.setSelection(ISelection) line: 1915
EcoreEditor$8.selectionChanged(SelectionChangedEvent) line: 1071
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01745 seconds