Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » eStructuralFeatureList not returning new added feature(eStructuralFeatureList not returning new added feature)
eStructuralFeatureList not returning new added feature [message #1775908] Wed, 08 November 2017 08:02 Go to next message
Aashi  jain is currently offline Aashi jainFriend
Messages: 1
Registered: November 2017
Junior Member
I have to add new feature inFulfillmentOf1 under eclassifier name =act. for this we made all the required changes under ecore and uml file. snapshot of ecore is attached below . after all changes when we created jar and try to access new added feature(infulfillmentof1) it is throwing arrayIndexOutOfBound error.
Please suggest where else i need to change the code to add new feature.

<eClassifiers xsi:type="ecore:EClass" name="Act" eSuperTypes="#//ClinicalStatement">
...
<eStructuralFeatures xsi:type="ecore:EReference" name="inFulfillmentOf1" ordered="false"
upperBound="-1" eType="#//InFulfillmentOf1" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="namespace" value="urn:hl7-org:sdtc"/>
<details key="kind" value="element"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>


the feature infulfillmentof1 is defined later as classifier also.
  • Attachment: cda.ecore
    (Size: 569.43KB, Downloaded 30 times)
Re: eStructuralFeatureList not returning new added feature [message #1775954 is a reply to message #1775908] Wed, 08 November 2017 14:54 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1162
Registered: July 2009
Location: Canada
Senior Member

Did you re-generate the code? The generated packaged doesn't load the metadata from the *.ecore file unless you tell it to in the GenModel.

HTH,
Christian
Re: eStructuralFeatureList not returning new added feature [message #1775960 is a reply to message #1775954] Wed, 08 November 2017 15:27 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5573
Registered: July 2009
Senior Member
Hi

The *.ecore GenModel normally does a reconcile() to update the *.genmodel wrt the *.ecore. Perhaps the *,uml GenModel needs manual intervention.

A common mistake with UML models is to update the Ecore files rather than the UML models.

Once you're finished, load the genmodel file and see if it has all your required features. Then see if the Ecore file has them. Then see if the Java has them.

Regards

Ed Willink
Previous Topic:newcomer question: automatic live validation
Next Topic:OMG-XML and XMI convert to Ecore?
Goto Forum:
  


Current Time: Wed Jan 17 09:29:51 GMT 2018

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

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