[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: "Initialize by loading" & DocumentRoot

Ed,

Thank you for the time you spent. That's what I thought also about the RCP.
I look forward to the M2 and I'll keep you abreast.

Fabrice Dubach

"Ed Merks" <Ed.Merks@xxxxxxxxx> a écrit dans le message de news: 
gbbma8$uiv$1@xxxxxxxxxxxxxxxxxxxx
> Fabrice,
>
> So this has nothing to do with RCP anyway.  Yet all this works for me.   I 
> vaguely recall Dave having done something related to this which caused a 
> problem that was subsequently fixed.  Please try the M2 build when it 
> comes out, or the most recent I build.  Sorry for the hassle...
>
>
> Fabrice Dubach wrote:
>> 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.
>>
>>