Re: Semantical container != Graphical container [message #4900] |
Thu, 03 August 2006 09:31  |
Eclipse User |
|
|
|
Originally posted by: jw377.safe-mail.net
Hello!
Dmitry Stadnik schrieb:
> Hello!
>
> Note is a pure design element and it's quite different. Basically
> you have to patch two things:
>
> 1. Container node canonical edit policy: modify
> getSemanticChildrenList() to use another container (it's parent I guess;
> that corresponds to diagram element; I assume that child node is stored
> in diagram element).
>
> 2. Container node item semantic edit policy: in generated
> CreateElementCommand modify getEClassToEdit() and getElementToEdit() to
> provide another container info (diagram element instead of container
> element).
>
> In gmfmap model you should define structure that follows graphical
> definition; in container node mapping there should be a ChildReference
> to the child node and child node mapping within it. ContainmentFeature
> of ChildReference could be written directly in text editor (ui filters
> it out since it's not available amongst container node features).
> Validation also will complain so you have to ignore it (((
I have tried your approach and now I am able to add an element to
another diagram element than the diagram element corresponding to it's
semantical container. But now I have a different problem:
On top level I have the diagram canvas (corresponding to semantical
element A). A references Elements of type B and C. Furthermore I have a
graphical node X (for the semantical element B) and a graphical node Y
(for the semantical element C).
By following your advice I am able to create Y-nodes within X-nodes. But
when I create this node within the X-node, another Y-node is also
created in the canvas. So I have two Y-nodes for one C element (one in
the X-node and one in the canvas).
Any idea how to prevent the second Y-node to appear in the canvas?
(I hope the A,B,C's were not too confusing ;-))
Thomas
F'up to eclipse.modeling.gmf
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04482 seconds