Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Creating objects with multi-valued children
Creating objects with multi-valued children [message #617800] Tue, 01 September 2009 21:33
Doug Bercot is currently offline Doug BercotFriend
Messages: 5
Registered: July 2009
Junior Member
... sorry in advance for cross-posting, but I'm a complete noob. I also
posted this query in eclipse.modeling.mdt.

If I were to create a simple object that has a containment association
with an N..N value (as shown in the "simple" model below), is there a
proper place in which I can modify the generated code such that the
contained objects are always of the correct number?

In this example, could I modify one of the factories such that a "Car"
object is always created with 4 "Tire" child objects?


<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:ecore=""; name="simple"
nsURI=""; nsPrefix="simple">
<eClassifiers xsi:type="ecore:EClass" name="Car">
<eStructuralFeatures xsi:type="ecore:EReference" name="tires"
lowerBound="4" upperBound="4"
eType="#//Tires" containment="true"/>
<eClassifiers xsi:type="ecore:EClass" name="Tires"/>
Previous Topic:[Announce] Eclipse Modeling Days
Next Topic:Creating objects with multi-valued children
Goto Forum:

Current Time: Wed Nov 14 21:49:34 GMT 2018

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

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

Back to the top