Enabling drag-n-drop from palette [message #685925] |
Mon, 20 June 2011 15:21  |
Eclipse User |
|
|
|
Hello,
I found this discussion on enabling DND from the palette in GMF generated editor. Changes work, but when I drag a palette item over any edit part in the editor feedback always shows that drop is permitted, even if particular edit part does not accept object being created. Is this expected behavior?
Thanks,
Alex
|
|
|
Re: Enabling drag-n-drop from palette [message #685980 is a reply to message #685925] |
Tue, 21 June 2011 04:59  |
Eclipse User |
|
|
|
Hi Alex,
take a look at the [XYZ]DiagramItemSemanticEditPolicy: here, in the getCreateCommand(CreateElementRequest req) method, you can disable the creation of unwanted objects simply returning "null"; this way, you have the "forbidden" cursor icon.
HTH, bye
Giovanni
|
|
|
Powered by
FUDForum. Page generated in 0.02463 seconds