Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:51
Aleksander Bandelj is currently offline Aleksander BandeljFriend
Messages: 98
Registered: July 2009
Member
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: Mon Jan 18 08:12:01 GMT 2021

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

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

Back to the top