|Dnd in diagram editor fires two event each call canAdd [message #698311]
||Tue, 19 July 2011 08:54
| Joerg Reichert
Registered: July 2009
I have implemented a tree viewer for my model so I can drag and drop nodes from that viewer to the diagram editor. The feature provider extracts the model element from the tree node and returns the responsible Add feature. This works so far. Then I added a dialog popping up when the dragged model element is not allowed to be add. This is done in the canAdd method of the Add feature. But this dialog twice as the canAdd method is called twice, once by the dragEnter event and a second time by the dragOver event. Is there any reason why the dragEnter event calls the canAdd method? How can this be adapted?
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Powered by FUDForum
. Page generated in 0.02051 seconds