[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: Semantical container != Graphical container

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 (((

Thomas Weiler wrote:
Thanks for your answer, Dmitry!
So while I can not (yet) achieve the desired behavior by using GMF generation, is there any way to achieve this manually (by coding)?
The default "note" element of GMF for example can be added to any (graphical) container (but has no corresponding semantical element).


Can you give me a hint where I have to look for in the generated code in order to create an element with different graphical and semantical containers?

Thanks in advance

Thomas