Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Customizing ModeLink/Exeed Editor
Customizing ModeLink/Exeed Editor [message #962776] Mon, 29 October 2012 10:18 Go to next message
Bernhard Hoisl is currently offline Bernhard HoislFriend
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!


[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 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 472
Registered: January 2010
Senior Member
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!
Re: Customizing ModeLink/Exeed Editor [message #964761 is a reply to message #962924] Tue, 30 October 2012 19:33 Go to previous message
Bernhard Hoisl is currently offline Bernhard HoislFriend
Messages: 26
Registered: March 2011
Junior Member
Thanks for the pointers.

Regarding (1), I tried to modify the editingDomain directly in the ExeedEditor class for testing purposes but it does not work. The read-only map contains the resource (getResourceToReadOnlyMap() returns the resource and the flag), but in the Exeed editor window it stays writeable. I did set the resource read-only in the createPages() method of ExeedEditor. As all methods return expected results, I think it has something to do with the load order? Do I have to refresh the editor or anything?

Previous Topic:[EGL] Can't get the type name of an operation
Next Topic:[EuGENia] Issue with the generated editor
Goto Forum:

Current Time: Sat Apr 21 11:57:27 GMT 2018

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

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