Need some EditPolicy related help [message #210527] |
Thu, 06 November 2008 07:42 |
Eclipse User |
|
|
|
Originally posted by: manojm.blr.interrasystems.com
Hi! All,
I have used DnD feature for dragging an element from treeviewer to
GMF editor.
When drop is occuring on rectangular figure (inside editor), i want to
create another child rectangular figure in it.
Could you please suggest - how to do that? Which EditPolicy should I
install?
If possible, please provide some code snippet.
Regards,
Manoj
|
|
|
|
Re: Need some EditPolicy related help [message #210600 is a reply to message #210577] |
Thu, 06 November 2008 12:44 |
Eclipse User |
|
|
|
Originally posted by: manojm.blr.interrasystems.com
Thanks Alex,
Regards,
Manoj
Alex Shatalin wrote:
> Hello Manoj,
>
> Try to handling D&D request for this particular child figure. You have
> to install DiagramDragDropEditPolicy inside corresponding
> XXXEditPart.createDefaultEditPolicies() method and handle drop request
> there. As an example you can use XXEditPart generated for the diagram
> element - it has corresponding EditPolicy generated, but you have to
> completely modify getDropObjectsCommand() to return a command creating
> "copy" of the element being dropped.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
Re: Need some EditPolicy related help [message #210663 is a reply to message #210577] |
Fri, 07 November 2008 04:30 |
Eclipse User |
|
|
|
Originally posted by: manojm.blr.interrasystems.com
Hi! Alex,
Could you please provide some code snippet or any reference to the same?
Regards,
Manoj
Alex Shatalin wrote:
> Hello Manoj,
>
> Try to handling D&D request for this particular child figure. You have
> to install DiagramDragDropEditPolicy inside corresponding
> XXXEditPart.createDefaultEditPolicies() method and handle drop request
> there. As an example you can use XXEditPart generated for the diagram
> element - it has corresponding EditPolicy generated, but you have to
> completely modify getDropObjectsCommand() to return a command creating
> "copy" of the element being dropped.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03876 seconds