crossecore / ecore-csharp

Ecore and OCL runtime API for C#
Eclipse Public License 2.0
10 stars 1 forks source link

Ability to load an instance of ecore model file(.xmi) #6

Open prad20 opened 3 years ago

prad20 commented 3 years ago

We tried using your library to parse an meta model made by Java EMF librray. We were able to parse the .ecore file with your library and facing issues when we try to load an instance of this model stored in a .xmi file. We have no issues reading the ecore file, but we are wondering the capability of reading an .xmi file. Is this use case supported by your library or we have to write an extension for your library to parse the .xmi file and have an EObject as output?

schwichti commented 3 years ago

You can try to use the constructor XmiResource(EPackage epackage, EFactory factory) and provide your generated EPackage and EFactory. Actually, I do not know if this was ever tested. The TypeScript implementation of XmiResource is more mature and needs to be backported to C#.