Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Dynamic classes are mapped as static/generated
[Teneo] Dynamic classes are mapped as static/generated [message #607002] Sun, 17 June 2007 12:51
Eclipse UserFriend
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
Previous Topic:[Teneo] : VersionPropertyHandler returns null for dettached objects
Next Topic:[Teneo] Dynamic classes are mapped as static/generated
Goto Forum:
  


Current Time: Wed May 14 12:48:32 EDT 2025

Powered by FUDForum. Page generated in 0.03193 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top