[Teneo] Dynamic classes are mapped as static/generated [message #86625] |
Sun, 17 June 2007 12:51  |
Eclipse User |
|
|
|
I was unable to find EMFT category in bugzilla so I am posting this here.
Detection whether model class is dynamic or static is broken with latest
Teneo CVS and EMF 2.3. Dynamic classes get <class
name="org.eclipse.emf.ecore.impl.DynamicEObjectImpl" ... > mapping,
which fails.
MappingContext#isDynamic is set to false for dynamic classes.
ERuntime#computeConcreteInstanceMapping detects that instance was
created and takes that as evidence that class is dynamic. But this just
puts DynamicEObjectImpl in eclassifierToConcrete map. My quick fix below
was to check getInstanceClass() as well
for (EClassifier eclassifier : epack.getEClassifiers()) {
if (!(eclassifier instanceof EClass))
continue;
// BEGIN FIX
if(eclassifier.getInstanceClass() == null)
continue;
// END FIX
final Object instance = create((EClass)eclassifier);
if (instance != null) {
eclassifierToConcrete.put((EClass) eclassifier, instance
.getClass());
concreteToEClass.put(instance.getClass(),
(EClass) eclassifier);
}
I
-a
|
|
|
Re: [Teneo] Dynamic classes are mapped as static/generated [message #86639 is a reply to message #86625] |
Sun, 17 June 2007 23:22  |
Eclipse User |
|
|
|
Thanks for reporting this, this is bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193052
Btw, here is a direct hyperlink to create an emft bugzilla (select teneo in the component listbox):
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT
gr. Martin
Aleksander Bandelj wrote:
> I was unable to find EMFT category in bugzilla so I am posting this here.
>
> Detection whether model class is dynamic or static is broken with latest
> Teneo CVS and EMF 2.3. Dynamic classes get <class
> name="org.eclipse.emf.ecore.impl.DynamicEObjectImpl" ... > mapping,
> which fails.
>
> MappingContext#isDynamic is set to false for dynamic classes.
> ERuntime#computeConcreteInstanceMapping detects that instance was
> created and takes that as evidence that class is dynamic. But this just
> puts DynamicEObjectImpl in eclassifierToConcrete map. My quick fix below
> was to check getInstanceClass() as well
>
> for (EClassifier eclassifier : epack.getEClassifiers()) {
> if (!(eclassifier instanceof EClass))
> continue;
> // BEGIN FIX
> if(eclassifier.getInstanceClass() == null)
> continue;
> // END FIX
> final Object instance = create((EClass)eclassifier);
> if (instance != null) {
> eclassifierToConcrete.put((EClass) eclassifier, instance
> .getClass());
> concreteToEClass.put(instance.getClass(),
> (EClass) eclassifier);
> }
>
> I
>
> -a
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo] Dynamic classes are mapped as static/generated [message #607003 is a reply to message #86625] |
Sun, 17 June 2007 23:22  |
Eclipse User |
|
|
|
Thanks for reporting this, this is bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193052
Btw, here is a direct hyperlink to create an emft bugzilla (select teneo in the component listbox):
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT
gr. Martin
Aleksander Bandelj wrote:
> I was unable to find EMFT category in bugzilla so I am posting this here.
>
> Detection whether model class is dynamic or static is broken with latest
> Teneo CVS and EMF 2.3. Dynamic classes get <class
> name="org.eclipse.emf.ecore.impl.DynamicEObjectImpl" ... > mapping,
> which fails.
>
> MappingContext#isDynamic is set to false for dynamic classes.
> ERuntime#computeConcreteInstanceMapping detects that instance was
> created and takes that as evidence that class is dynamic. But this just
> puts DynamicEObjectImpl in eclassifierToConcrete map. My quick fix below
> was to check getInstanceClass() as well
>
> for (EClassifier eclassifier : epack.getEClassifiers()) {
> if (!(eclassifier instanceof EClass))
> continue;
> // BEGIN FIX
> if(eclassifier.getInstanceClass() == null)
> continue;
> // END FIX
> final Object instance = create((EClass)eclassifier);
> if (instance != null) {
> eclassifierToConcrete.put((EClass) eclassifier, instance
> .getClass());
> concreteToEClass.put(instance.getClass(),
> (EClass) eclassifier);
> }
>
> I
>
> -a
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.05570 seconds