Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » linked graphic element from a model element
linked graphic element from a model element [message #477076] Wed, 12 March 2008 13:26 Go to next message
Emilien Perico is currently offline Emilien PericoFriend
Messages: 36
Registered: July 2009
Member
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 #477078 is a reply to message #477076] Wed, 12 March 2008 13:50 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 #477081 is a reply to message #477078] Wed, 12 March 2008 15:34 Go to previous messageGo to next message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
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 #477082 is a reply to message #477081] Wed, 12 March 2008 17:02 Go to previous messageGo to next message
Emilien Perico is currently offline Emilien PericoFriend
Messages: 36
Registered: July 2009
Member
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 #477083 is a reply to message #477082] Wed, 12 March 2008 17:29 Go to previous message
Eclipse UserFriend
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 13:50 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 15:34 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
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 #626209 is a reply to message #477081] Wed, 12 March 2008 17:02 Go to previous message
Emilien Perico is currently offline Emilien PericoFriend
Messages: 36
Registered: July 2009
Member
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 #626210 is a reply to message #477082] Wed, 12 March 2008 17:29 Go to previous message
Eclipse UserFriend
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.
Previous Topic:linked graphic element from a model element
Next Topic:Sequence Diagrams - creating a message which source and target is the same lifeline
Goto Forum:
  


Current Time: Fri Apr 19 06:02:32 GMT 2024

Powered by FUDForum. Page generated in 0.02586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top