linked graphic element from a model element [message #477076] |
Wed, 12 March 2008 09:26  |
Eclipse User |
|
|
|
Hi all,
Is it possible to get the linked graphic element from a model element ?
example:
I have a LifeLine object and I want to know which graphic element is
linked with it. In this case a LifeLineFigure (org.eclipse.draw2d).
Thanks for your help.
|
|
|
|
|
|
Re: linked graphic element from a model element [message #477083 is a reply to message #477082] |
Wed, 12 March 2008 13:29  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Emilien,
Have a look at the ECrossReferenceAdapter API from EMF. The CacheAdapter
that is implicitly installed on every UML model element is a specialization
of this class.
It provides, among other capabilities, fast look-up of the inverse direction
of non-navigable cross-references (such as View::element in the diagrams).
HTH,
Christian
Emilien Perico wrote:
> Working closely on the problem, I saw that there is a model reference
> foreach diagram node.
>
> As I'm interested in the reverse action, the only solution I found is to
> scan all diagrams. I don't know if there is a best way to do.
|
|
|
Re: linked graphic element from a model element [message #626205 is a reply to message #477076] |
Wed, 12 March 2008 09:50  |
Eclipse User |
|
|
|
Hi Emilien,
This might be a question for UML2Tools newsgroup since the UML2 project
doesn't directly support graphical elements.
What's probably going on is that graphical elements or references to them
could be stored under annotations in the UML2 model (under specific
elements).
You can basically jam whatever you want in an annotation under model
elements including references to other graphical elements.
You might have to post a little snippet of the model with embedded graphical
elements before we can say how to extract the information you are looking
for.
Cheers,
- James.
"Emilien Perico" <emilien.perico@atosorigin.com> wrote in message
news:2dcee4544db3128111c5a6f1074b49a2$1@www.eclipse.org...
> Hi all,
>
> Is it possible to get the linked graphic element from a model element ?
>
> example:
> I have a LifeLine object and I want to know which graphic element is
> linked with it. In this case a LifeLineFigure (org.eclipse.draw2d).
>
> Thanks for your help.
|
|
|
Re: linked graphic element from a model element [message #626208 is a reply to message #477078] |
Wed, 12 March 2008 11:34  |
Eclipse User |
|
|
|
The UML2Tools does not embed diagrams in annotations (as is done with
RSM/A), but each diagram is saved in a separate resource file. And each
diagram node contains a reference to the semantic element. I don't know of
any way to get the reverse pointer from model element to graphical node,
except by opening and scanning all diagrams and saving the
semantic/graphical cross-references.
Dave
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fr8n3o$vn5$2@build.eclipse.org...
> Hi Emilien,
>
> This might be a question for UML2Tools newsgroup since the UML2 project
> doesn't directly support graphical elements.
> What's probably going on is that graphical elements or references to them
> could be stored under annotations in the UML2 model (under specific
> elements).
> You can basically jam whatever you want in an annotation under model
> elements including references to other graphical elements.
>
> You might have to post a little snippet of the model with embedded
> graphical elements before we can say how to extract the information you
> are looking for.
|
|
|
|
Re: linked graphic element from a model element [message #626210 is a reply to message #477082] |
Wed, 12 March 2008 13:29  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Emilien,
Have a look at the ECrossReferenceAdapter API from EMF. The CacheAdapter
that is implicitly installed on every UML model element is a specialization
of this class.
It provides, among other capabilities, fast look-up of the inverse direction
of non-navigable cross-references (such as View::element in the diagrams).
HTH,
Christian
Emilien Perico wrote:
> Working closely on the problem, I saw that there is a model reference
> foreach diagram node.
>
> As I'm interested in the reverse action, the only solution I found is to
> scan all diagrams. I don't know if there is a best way to do.
|
|
|
Powered by
FUDForum. Page generated in 0.05629 seconds