The exemple test code failed, the console output is :
Enter a list of file paths or URIs that have content like this:
Exception in thread "main" java.lang.ClassCastException: The feature
'library's type 'null' does not permit a value of type 'Library'
at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2909)
at
org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:181)
at
org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:102)
at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1216)
at
com.example.library.impl.DocumentRootImpl.setLibrary(DocumentRootImpl.java:156)
at com.example.library.tests.LibraryExample.main(LibraryExample.java:70)
What I saw when I tryed to debug my own model (before I found that a
simplier model like the library's one could reproduce this behavior) is that
the EStructuralFeature objects was well instanciated (including the name
attribute), but not its EType attribut. So, in the createInitialModel, the
eStructuralFeature is found but it is the EcoreUtil.create which failed.