in case 1 am using the EMFInjector to inject an xmi resource into the bsmModel.
in this case the ATL transformation is applied well on the input model and the result model conforms with my purpose.
in case 2 am using a personalized class called CDOInjector which extends EMFInjector but instead of injecting an xmi resource am trying to inject an object of type myType___Impl which extends CDOObject the result of the transformation is null with no exceptions fired during the transformation.
The only difference between the two casses is that after the injection:
in case 1 (EMFModel)bsmModel).getResource().getContents().get(0) is a DynamicEObjectImpl
in case 2 (EMFModel)bsmModel).getResource().getContents().get(0) is not of the same type.
The question which might clarify the situation is: Does the EMFVLauncher has constraints on contents type? are we obliged to use DynamicEObjectImpl objects?
am trying to inject an object of type myType___Impl which extends CDOObject the result
I don't know the implementation of the CDOInjector but the underlying code under EMFInjector, EMFModel and so on is not intended to manage single objects.
Maybe you can try to directly inject the CDO resource using org.eclipse.m2m.atl.core.emf.EMFInjector.inject(IModel, Resource).
Does the EMFVLauncher has constraints on contents type?
No. For the injection the injector behaviour is the same as EMF. For the extraction you can specify which content-type to use which make ATL recreate a resource using the correct ResourceFactory. But I don't think your issue has to deal with EMF content-types here.
are we obliged to use DynamicEObjectImpl objects?
The fact that you have DynamicEObjectImpl objects comes from the way you load the metamodel. If the metamodel is deployed you should load it from its registry URI. If you load it using a workspace file path to the .ecore file, ATL will load the metamodel dynamically and thus the model will be loaded using DynamicEObjectImpl.
1- I tried to inject the CDOResource using inject(IModel targetModel, Resource resource) but it didn't work, i got an empty result.
2- i asked about obligations to use DynamicEObjectImpl object because i tried to load an xmi resource while registring the Package.eInstance in the package registry,thus the contents where of the correct type myTypr___Impl and not DynamicEObjectImpl in this way that transformation didn't work
i'am blocked here since i don't want to create xmi file in order to apply my ATL transformation.