[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] Re: [Epsilon] Problem with ECL

Hi Steve,

Oops... The example on the EML documentation page is based on an old version of the language. I'll update it asap. Until then, you can check out the updated/working "Merging two Object Oriented Models" example from http://www.eclipse.org/gmt/epsilon/doc/examples.php.

Cheers,
Dimitrios

Steve Barrett wrote:
I'm playing with EML now Dimitrios. Something doesn't seem right however. When I try to merge the MergeOO example only the <Models> rule matches, and the resulting Merged.model is simply a union of *all* the elements in both models. I end up with duplicate School and Teacher classes, and String Datatypes.

I was expecting something more like I see explained in the example at
http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/epsilon/org.epsilon.eclipse.help/index.html



For reference I've pasted in the text view of the output model:

<?xml version="1.0" encoding="ASCII"?>
<OO:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:OO="OO" xmi:id="_O6fjQCFYEd2zH6RpYvdvlA" name="educational">
<contents xsi:type="OO:Class" xmi:id="_O6gKUCFYEd2zH6RpYvdvlA" name="Student" isAbstract="false">
<features xsi:type="OO:Reference" xmi:id="_O6gxYCFYEd2zH6RpYvdvlA" name="supervisor" type="_O6hYcCFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
<contents xsi:type="OO:Class" xmi:id="_O6m4ACFYEd2zH6RpYvdvlA" name="School" isAbstract="false">
<features xsi:type="OO:Attribute" xmi:id="_O6m4ASFYEd2zH6RpYvdvlA" name="address" type="_O6nfECFYEd2zH6RpYvdvlA" isMany="false"/>
<features xsi:type="OO:Attribute" xmi:id="_O6xQECFYEd2zH6RpYvdvlA" name="acceptsPostcodes" type="_O6nfECFYEd2zH6RpYvdvlA" isMany="true"/>
<features xsi:type="OO:Reference" xmi:id="_O6x3ICFYEd2zH6RpYvdvlA" name="employees" type="_O6yeMCFYEd2zH6RpYvdvlA" isMany="true"/>
</contents>
<contents xsi:type="OO:Class" xmi:id="_O6lC0CFYEd2zH6RpYvdvlA" name="Module" isAbstract="false">
<features xsi:type="OO:Attribute" xmi:id="_O6lC0SFYEd2zH6RpYvdvlA" name="subject" type="_O6lp4CFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
<contents xsi:type="OO:Class" xmi:id="_O606cCFYEd2zH6RpYvdvlA" name="Support" extends="_O6yeMCFYEd2zH6RpYvdvlA" isAbstract="false">
<features xsi:type="OO:Attribute" xmi:id="_O606cSFYEd2zH6RpYvdvlA" name="role" type="_O6nfECFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
<contents xsi:type="OO:Datatype" xmi:id="_O62IkSFYEd2zH6RpYvdvlA" name="Real"/>
<contents xsi:type="OO:Datatype" xmi:id="_O6nfECFYEd2zH6RpYvdvlA" name="String"/>
<contents xsi:type="OO:Class" xmi:id="_O6zFQCFYEd2zH6RpYvdvlA" name="Person" extendedBy="_O6yeMCFYEd2zH6RpYvdvlA" isAbstract="true">
<features xsi:type="OO:Attribute" xmi:id="_O6zsUCFYEd2zH6RpYvdvlA" name="details" type="_O6nfECFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
<contents xsi:type="OO:Datatype" xmi:id="_O64k0CFYEd2zH6RpYvdvlA" name="Boolean"/>
<contents xsi:type="OO:Class" xmi:id="_O6imkCFYEd2zH6RpYvdvlA" name="Class" isAbstract="false">
<features xsi:type="OO:Attribute" xmi:id="_O6imkSFYEd2zH6RpYvdvlA" name="grade" type="_O6jNoCFYEd2zH6RpYvdvlA" isMany="false"/>
<features xsi:type="OO:Reference" xmi:id="_O6j0sCFYEd2zH6RpYvdvlA" name="students" type="_O6gKUCFYEd2zH6RpYvdvlA" isMany="true"/>
<features xsi:type="OO:Reference" xmi:id="_O6kbwCFYEd2zH6RpYvdvlA" name="modules" type="_O6lC0CFYEd2zH6RpYvdvlA" isMany="true"/>
</contents>
<contents xsi:type="OO:Class" xmi:id="_O6yeMCFYEd2zH6RpYvdvlA" name="Employee" extends="_O6zFQCFYEd2zH6RpYvdvlA" extendedBy="_O60TYCFYEd2zH6RpYvdvlA _O606cCFYEd2zH6RpYvdvlA" isAbstract="true">
<features xsi:type="OO:Attribute" xmi:id="_O62IkCFYEd2zH6RpYvdvlA" name="salary" type="_O62IkSFYEd2zH6RpYvdvlA" isMany="false"/>
<features xsi:type="OO:Reference" xmi:id="_O62voCFYEd2zH6RpYvdvlA" name="manager" type="_O6yeMCFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
<contents xsi:type="OO:Class" xmi:id="_O60TYCFYEd2zH6RpYvdvlA" name="Teacher" extends="_O6yeMCFYEd2zH6RpYvdvlA" isAbstract="false"/>
<contents xsi:type="OO:Datatype" xmi:id="_O6lp4CFYEd2zH6RpYvdvlA" name="String"/>
<contents xsi:type="OO:Class" xmi:id="_O6hYcCFYEd2zH6RpYvdvlA" name="Teacher" isAbstract="false">
<features xsi:type="OO:Reference" xmi:id="_O6h_gCFYEd2zH6RpYvdvlA" name="teaches" type="_O6imkCFYEd2zH6RpYvdvlA" isMany="true"/>
</contents>
<contents xsi:type="OO:Datatype" xmi:id="_O6jNoCFYEd2zH6RpYvdvlA" name="Integer"/>
<contents xsi:type="OO:Class" xmi:id="_O65L4CFYEd2zH6RpYvdvlA" name="School" isAbstract="false">
<features xsi:type="OO:Reference" xmi:id="_O65y8CFYEd2zH6RpYvdvlA" name="classes" type="_O6imkCFYEd2zH6RpYvdvlA" isMany="true"/>
<features xsi:type="OO:Reference" xmi:id="_O66aACFYEd2zH6RpYvdvlA" name="principal" type="_O6hYcCFYEd2zH6RpYvdvlA" isMany="false"/>
</contents>
</OO:Model>