Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Connection source and target in XMI file
Connection source and target in XMI file [message #175132] Mon, 03 March 2008 13:23 Go to next message
Noor Ul Hassan is currently offline Noor Ul HassanFriend
Messages: 23
Registered: July 2009
Junior Member
Hi All,
I generated gmf diagram and XMI file (which is like xml file for diagram)
and are working fine.

when I draw a connection line to connect elements of diagram from source
element to target element, in xmi file it shows element's index number
instead of the name of elemnent. like: (components.0 , components.1 ....)

(conns, hcomponents and components are EReferences with containment true
in model)

<conns source="//@hcomponents.0/@components.1"
target="//@hcomponents.0/@components.0"/>
<conns source="//@hcomponents.0/@components.1"
target="//@hcomponents.0/@components.2"/>

I want to have names of source and target elements in xmi file instead of
their index numbers.

Any hint how can I do it.

Thanks in advance.
Re: Connection source and target in XMI file [message #175156 is a reply to message #175132] Mon, 03 March 2008 14:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Noor,

This is more an EMF question. What you see here are fragment paths that
specify how to get from the root of the resource to the object being
referenced. If you want something that's more symbolic, you'd need to
define IDs or your object (an EAttribute with isID true) or use a
resource implementation that generates associated IDs (overrides
XMIResourceImpl.useUUIDs to return true).


Noor wrote:
> Hi All,
> I generated gmf diagram and XMI file (which is like xml file for
> diagram) and are working fine.
>
> when I draw a connection line to connect elements of diagram from
> source element to target element, in xmi file it shows element's index
> number instead of the name of elemnent. like: (components.0 ,
> components.1 ....)
>
> (conns, hcomponents and components are EReferences with containment
> true in model)
>
> <conns source="//@hcomponents.0/@components.1"
> target="//@hcomponents.0/@components.0"/>
> <conns source="//@hcomponents.0/@components.1"
> target="//@hcomponents.0/@components.2"/>
>
> I want to have names of source and target elements in xmi file instead
> of their index numbers.
>
> Any hint how can I do it.
>
> Thanks in advance.
>
>
>
>
>
Re: Connection source and target in XMI file [message #179216 is a reply to message #175156] Wed, 26 March 2008 15:03 Go to previous messageGo to next message
Noor Ul Hassan is currently offline Noor Ul HassanFriend
Messages: 23
Registered: July 2009
Junior Member
Dear Ed,
Can you please explain it with example. I tried a lot but no progress. or
can you refer a tutorial for this.

Thanks
Re: Connection source and target in XMI file [message #179231 is a reply to message #179216] Wed, 26 March 2008 15:06 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------070303030008080708030606
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Noor,

Follow this tutorial and be sure to invoke Generate Test Code so you can
look at the generated example.

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc/tutorials/xlibmod/xlibmod.html

I'm not sure what to point you at in terms of getting GMF to separate
your model from your diagram file...

This document shows the annotations on the Ecore model that correspond
to the information in the XML Schema.

http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf



Noor wrote:
> Dear Ed,
> Can you please explain it with example. I tried a lot but no progress.
> or can you refer a tutorial for this.
>
> Thanks
>


--------------070303030008080708030606
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Noor,<br>
<br>
Follow this tutorial and be sure to invoke Generate Test Code so you
can look at the generated example.<br>
<blockquote><a
href=" http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc/tutorials/xlibmod/xlibmod.html"> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc/tutorials/xlibmod/xlibmod.html</a><br>
</blockquote>
I'm not sure what to point you at in terms of getting GMF to separate
your model from your diagram file...<br>
<br>
This document shows the annotations on the Ecore model that correspond
to the information in the XML Schema.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf"> http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf</a><br>
</blockquote>
<br>
<br>
Noor wrote:
<blockquote
cite="mid:3d14b2b305c92bad6f994bf6046e8a70$1@www.eclipse.org"
type="cite">Dear Ed,
<br>
Can you please explain it with example. I tried a lot but no progress.
or can you refer a tutorial for this.
<br>
<br>
Thanks
<br>
<br>
</blockquote>
<br>
</body>
</html>

--------------070303030008080708030606--
Previous Topic:Presentations from EclipseCon
Next Topic:Edit popup issue
Goto Forum:
  


Current Time: Wed Apr 24 23:03:53 GMT 2024

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

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

Back to the top