Drag & drop in parent - child relation [message #1760572] |
Fri, 28 April 2017 09:36  |
Eclipse User |
|
|
|
Hi everybody,
I am trying to implement drag & drop functionality to my GEF4 application.
I have parent nodes (SWComponent) and child nodes (SWFunction). SWFunctions can be added to SWComponents.
Drag & drop works fine if I implement it for SWComponentPart or SWFunctionPart only. Therefore I use:
adapterMapBinder.addBinding(AdapterKey.defaultRole()).to(FXTransformPolicy.class);
adapterMapBinder.addBinding(AdapterKey.defaultRole()).to(FXTranslateSelectedOnDragPolicy.class);
But If I implement it for both SWComponent and SWFunction I get a lot of errors if I try to drag a SWFunction within a SWComponent.
(Draging a SWFunction or SWComponent within RootPart still works)
The first Error occures in AbstractTransactionPolicy -> checkUninitialized() and says "Already initialized"
I suppose this happens because I bind FXTransformPolicy to both SWComponentPart and SWFunctionPart?
Is this not allowed?
What do I have to do to enable drag and drop for SWFunctions within SWComponents while SWComponents can still be dragged.
Thanks,
Thomas
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03299 seconds