Avoiding Duplicate EditParts? [message #157010] |
Wed, 24 October 2007 12:45  |
Eclipse User |
|
|
|
Originally posted by: Simon.James.aepona.com
Hi
In my semantic model, I have a class XYZ. An instance of XYZ is contained
either by class ABC or class DEF.
Both types of containment need to be shown in my diagram.
When I generate the diagram, the code generator creates XYZEditPart (for
containment by ABC) and XYZ2EditPart (containment by DEF).
They are identical apart from VISUAL_ID constants etc.
Is there any way of avoiding or at least reducing the duplication?
Thanks.
Simon
|
|
|
|
|
|
|
|
Re: Avoiding Duplicate EditParts? [message #157430 is a reply to message #157252] |
Sat, 27 October 2007 08:30  |
Eclipse User |
|
|
|
hi,
maybe try this (posting 'Re: Duplicate edit parts', tobias):
"I'm not sure if this always works, but it works for me: When I did not have
the references for the child nodes in my gmfmap defined (you do use
references, don't you?) I did a first test-generation of the diagram code.
Back then the edit parts were created once only - of cource. When I then
created the child-references and recreated the diagram code, no duplicate
edit parts were created, while they are created, when I completely delete
the diagram editor project, so I guess that the gmfgen does not create
duplicates, when it finds adequate classen in the existing project.
Try to delete the gmfgen and the diagram code, cut out the child references,
generate gmfgen and code, paste in the child references again and recreate
the code. Maybe it works. Good luck!"
Simon James schrieb:
> Thanks for the tip.
> I'd be grateful for a reference to where this subject is
> described/discussed.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04389 seconds