Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Override Drag and Drop
Override Drag and Drop [message #487848] Thu, 24 September 2009 14:47 Go to next message
Morten MacFly is currently offline Morten MacFlyFriend
Messages: 69
Registered: July 2009
Member
Hi all,

I've (another) question: I have two models where in one model a sub-tree
is a "transformation" of a specific subtree of the other model. Meaning:
Model A.a = function_of(Model B.b), whereas A.a and B.b are EObjects
with several EAttributes. For the user I'd like to present a way to drag
Model B.b onto the Model A so it creates another Model A.a instance (subtree)
by doing the transformation and filling the attributes of Model A.a via
reflective API. Hence I am simply struggeling with what method I need to
override exactly in the selection view that's responsible for the drag&drop
behaviour??? I did not even to manage to "allow" dropping of Model B.b..
:-(
Any help would be greatly appreciated.


--


Mit freundlichen Grüßen
Martin Halle
==============================================
|° Martin Halle °|
| TUHH Institut für Flugzeug-Systemtechnik |
| Technologiezentrum Hamburg-Finkenwerder |
| Nesspriel 5 |
| D-21129 Hamburg |
| Tel: (0)40 428 78 - 8209 |
| Fax: (0)40 428 78 - 8270 |
| http://www.tuhh.de/fst |
|° mailto:martin.halle@tuhh.de °|
==============================================
Re: Override Drag and Drop [message #488049 is a reply to message #487848] Fri, 25 September 2009 12:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Morten,

Probably you want to look at specializing things like
DragAndDropCommand.prepareDropCopyOn so that it creates an executable
command in the case you desire by creating a new type of object that
actually can be added to the target.


Morten MacFly wrote:
> Hi all,
>
> I've (another) question: I have two models where in one model a sub-tree
> is a "transformation" of a specific subtree of the other model. Meaning:
> Model A.a = function_of(Model B.b), whereas A.a and B.b are EObjects
> with several EAttributes. For the user I'd like to present a way to drag
> Model B.b onto the Model A so it creates another Model A.a instance (subtree)
> by doing the transformation and filling the attributes of Model A.a via
> reflective API. Hence I am simply struggeling with what method I need to
> override exactly in the selection view that's responsible for the drag&drop
> behaviour??? I did not even to manage to "allow" dropping of Model B.b..
> :-(
> Any help would be greatly appreciated.
>
>
> --
>
>
> Mit freundlichen Grüßen
> Martin Halle
> ==============================================
> |° Martin Halle °|
> | TUHH Institut für Flugzeug-Systemtechnik |
> | Technologiezentrum Hamburg-Finkenwerder |
> | Nesspriel 5 |
> | D-21129 Hamburg |
> | Tel: (0)40 428 78 - 8209 |
> | Fax: (0)40 428 78 - 8270 |
> | http://www.tuhh.de/fst |
> |° mailto:martin.halle@tuhh.de °|
> ==============================================
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to use CopyCommand
Next Topic:Re: How can I put together TransactionalEditingDomain and a monitored CommandStack
Goto Forum:
  


Current Time: Thu Apr 25 08:53:40 GMT 2024

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

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

Back to the top