Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF nesting references problem
GMF nesting references problem [message #117503] Thu, 05 April 2007 16:24
Eclipse UserFriend
Originally posted by: volt.vega.eti.pg.gda.pl

Hello,

I'm working on a simple dependencies editor - nodes are artifacts and edges
are dependencies.
My schema from which I created .ecore looks like this:

<element name="cdlext" type="cdlext:CDLExt"/>

<complexType name="CDLExt">
<sequence>
<element name="artifacts" type="cdlext:Artifacts" minOccurs="1"
maxOccurs="1"></element>
<element name="dependencies" type="cdlext:Dependencies"
minOccurs="1" maxOccurs="1"></element>
</sequence>
<attribute name="name" type="ID"></attribute>
</complexType>

<complexType name="Artifacts">
<sequence minOccurs="0" maxOccurs="unbounded">
<element name="artifact" type="cdlext:Artifact"
maxOccurs="unbounded" minOccurs="0"/>
</sequence>
</complexType>

<complexType name="Artifact">
<attribute name="ID" type="ID" use="required"/><attribute name="name"
type="string" use="optional"/>
<attribute name="type" use="required">
<simpleType>
<restriction base="string">
<enumeration value="business"></enumeration>
<enumeration value="database"></enumeration>
<enumeration value="service"></enumeration>
<enumeration value="other"></enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>

<complexType name="Dependencies">
<sequence>
<element name="dependency" minOccurs="0" type="cdlext:Dependency"
maxOccurs="unbounded"/>
</sequence>
</complexType>

<complexType name="Dependency">
<attribute name="id" type="ID" use="required" />
<attribute name="from" type="IDREF" use="required"
ecore:reference="cdlext:Artifact"/>
<attribute name="to" type="IDREF" use="required"
ecore:reference="cdlext:Artifact"/>
</complexType>


so a example xml file would look like:

<cdlext>
<artifacts>
<artifact ID="aaa"/>
<artifact ID="bbb"/>
</artifacts>
<dependencies>
<dependency ID="ccc" from="aaa" to="bbb"/>
</dependencies>
</cdlext>

the EMF editor generated for .ecore generated for that schema works fine -
'ecore:reference' is allright

however, when I create simple editor with GMF:
Artifacts - compartment for Artifact nodes
Artifact - node
Dependency - link

I get editor in which I can add artifacts, but linking doesn't work.
All that without any validation errors in any of preceeding steps.

Does anybody got a clue what could be wrong with that?
I suspect there is a problem with <dependency> being aggregated inside
<dependencies> tag.
However, I would really prefer to keep the schema untouched.

I tried different combinations - even added a top node - "dependencies",
with it I can see links that are already in the model
(added by hand) but I can't add any in the generated GMF editor.

Regards,
Konrad Dusza
Previous Topic:displaying the root element on diagram
Next Topic:Starting point towards persisting custom notation attributes
Goto Forum:
  


Current Time: Sun Oct 06 08:18:06 GMT 2024

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

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

Back to the top