Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link Mapping Operation
Link Mapping Operation [message #486618] Fri, 18 September 2009 12:19 Go to next message
Eclipse UserFriend
Originally posted by: gabriele.boldrin.finantix.com

I have a connection with inside a String like source and target
references. This values are the ID of the source and target objects. How
can I create a Link Mapping?

Something like

<diagram>
<node id="A">
<node id="B">
<link name="T">
<source id="A"/> (id type: String)
<target id="B"/> (id type: String)
</link>
<diagram>
Re: Link Mapping Operation [message #486704 is a reply to message #486618] Fri, 18 September 2009 15:55 Go to previous messageGo to next message
Artur Kronenberg is currently offline Artur KronenbergFriend
Messages: 159
Registered: August 2009
Senior Member
Gabriele,

in your .gmfmap you can specify your link mapping. You have to specify
Source Feature and Target Feature to your connection source and target
elements.

This is how it should work I think:

Source Feature: link.source:node
Target Feature: link.target:node

In your ecore of course you need to define, that a link knows about its
source and its target.

Hope that helps,

Best regards,
Artur

gabriele wrote:

> I have a connection with inside a String like source and target
> references. This values are the ID of the source and target objects. How
> can I create a Link Mapping?

> Something like

> <diagram>
> <node id="A">
> <node id="B">
> <link name="T">
> <source id="A"/> (id type: String)
> <target id="B"/> (id type: String)
> </link>
> <diagram>
Re: Link Mapping Operation [message #486899 is a reply to message #486618] Sun, 20 September 2009 20:19 Go to previous message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello gabriele,

> I have a connection with inside a String like source and target
> references. This values are the ID of the source and target objects.
> How can I create a Link Mapping?
If you'd like to store only string referenced in domain model then solution
is:
- either to create derived transient features for source/target of the link
inside domain model and implement corresponding EMF-generated get/set methods.
Idea is to determine link targets from string properties on getter invocation
and set corresponding string properties on setting derived reference value.
- or modify GMF-generated code manually.

-----------------
Alex Shatalin
Previous Topic:Position of side affixed children is not updated properly - Bug in GMF 2.2?
Next Topic:how to decide the label text during the runtime
Goto Forum:
  


Current Time: Wed Apr 24 18:49:37 GMT 2024

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

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

Back to the top