How to delete an editpart from the diagram [message #170315] |
Thu, 03 March 2005 15:51 |
Eclipse User |
|
|
|
Originally posted by: jsk_lam.hotmail.com
Hi,
Can someone show me how to delete/remove a node editpart from the
diagram manually/programmatically? I try the following:
Diagram diagram; // Diagram is AbstractGraphicalEditPart-derived class
Node node; // Node is AbstractGraphicalEditPart-derived class
// Error: removedChild(0 is not visible, it is a protected
// method in AbstractGraphicalEditPart.
diagram.removeChild(node);
Thanks
slam
|
|
|
Re: How to delete an editpart from the diagram [message #170346 is a reply to message #170315] |
Thu, 03 March 2005 22:23 |
Eclipse User |
|
|
|
Originally posted by: binti.ksu.edu
Slam,
You will need to create an edit policy for this node, that extends component
policy. and implements createDeleteCommand(GroupRequest request). In this
method you will need to instatiate a command that deletes the node. If you
need more help let me know.
This should be available in logic example and schema diagram editor example.
Binti.
"slam" <jsk_lam@hotmail.com> wrote in message
news:d07bqp$a0$1@www.eclipse.org...
> Hi,
>
> Can someone show me how to delete/remove a node editpart from the
> diagram manually/programmatically? I try the following:
>
> Diagram diagram; // Diagram is AbstractGraphicalEditPart-derived class
> Node node; // Node is AbstractGraphicalEditPart-derived class
>
> // Error: removedChild(0 is not visible, it is a protected
> // method in AbstractGraphicalEditPart.
> diagram.removeChild(node);
>
> Thanks
> slam
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03554 seconds