Diagram label for association ends - modify domain model or diagram code? [message #203302] |
Mon, 25 August 2008 11:14  |
Eclipse User |
|
|
|
Hi All,
I have an Association EClass which contains two AssociationEnd EClasses,
which have a bunch of properties, like name, multiplicity, etc. I'd like
to display these properties on the canvas at each end of the Association
link, but can't decide which approach is better:
1.) Create derived features on Association and delegate to the contained
AssociationEnds
2.) Manually modify the generated diagram code (most likely the
LabelEditPart class) to use the AssociationEnd properties and listen to
the changes of the contained AssociationEnds and not just the Association
I'm a bit hesitant to pollute my domain model just to make visualization
easier, but don't know (yet) how and where to modify the generated GMF
code. These are the ideas I had so far, but I'm also open to new
suggestions on how to implement this, any help or opinion would be
appreciated.
Thanks in advance,
Zsolt
|
|
|
|
Re: Diagram label for association ends - modify domain model or diagram code? [message #203368 is a reply to message #203335] |
Tue, 26 August 2008 06:15  |
Eclipse User |
|
|
|
Hi Alex,
> In this case I suggest you creating corresponding lables using LabelMapping
> (not FeatureLabelMapping). As a result corresponding parser will not be
enerated
> for you and you'll be able to implement it and plug it in using runtime
extension
> point (org.eclipse.gmf.runtime.common.ui.services.parserProviders) .
Just before reading your response I've been looking at the way association
labels are implemented in UML2 Tools and they seem to be using their own
IParsers as well. Looks like a viable solution, I think that's the way to
go for us.
Thanks for your help!
Zsolt
|
|
|
Powered by
FUDForum. Page generated in 0.04560 seconds