Customizing ModeLink/Exeed Editor [message #962776] |
Mon, 29 October 2012 10:18 |
Bernhard Hoisl Messages: 26 Registered: March 2011 |
Junior Member |
|
|
I want to customize the ModeLink editor for my purposes and got stuck with two problems:
(1) I want to provide the three Ecore models loaded in the three windows as read-only. Is this possible and how can I do it?
(2) If I drag-and-drop one EObject from one window into another, where does this event get recognized? I want to store drag-and-drop actions in a separate model. For example, if a user drags an Ecore object from model A into model B, I want to save this Ecore object (in a separate model). Thus, I have to know where I track the firing of the event.
Maybe someone from the community can point me to the respective code pieces?
Thank you!
-Bernhard
[Updated on: Mon, 29 October 2012 10:21] Report message to a moderator
|
|
|
Re: Customizing ModeLink/Exeed Editor [message #962924 is a reply to message #962776] |
Mon, 29 October 2012 12:38 |
|
The ModeLink editor is essentially a three-pane container for three regular editors. We don't really do much besides setting up the editors, but you do need to use the Exeed editor (org.eclipse.epsilon.dt.exeed.ExeedEditor in the org.eclipse.epsilon.dt.exeed project) in order to get the drop area for the model elements that you drag from the other model editors. The editors you drag elements from do not need to be Exeed editors: it's only for the editor you are dropping things into.
As for your questions:
1) You could customize the Exeed editor so it could take an additional flag saying whether the resources in its editing domain (it's in its editingDomain field) should be read only or not. You'll probably need to extend the o.e.e.dt.exeed.modelink.ModeLink class so that option is properly stored and loaded, and then the ModeLinkEditor so it is propagated over to the ExeedEditor instances. If you use any other editor besides the Exeed editor, you'll need to customize their own editing domains as well.
2) The drop event is handled by the drop method in the ExeedEditingDomainViewerDropAdapter. Currently, it issues the appropriate AddReferenceValuesCommand and SetReferenceValueCommand as needed. You'll probably want to register a different command handler for those commands that overrides the default behaviour, or have it issue a different set of commands.
Hope that helps!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02850 seconds