Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EEnum to Epackage relationship lost
EEnum to Epackage relationship lost [message #603148] Tue, 06 March 2007 13:35
Prateek is currently offline PrateekFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,
I have a condition where I have an EPackage(OriginPackage) with some
EClassifiers in it.

Now using Dynamic EMF we are trying to create a new package with details
from OriginPackage like EClassifiers,name,uri,nsURI.

Code Snipplet:

for (Iterator iter = oldSubpackage.getEClassifiers().iterator();
iter.hasNext();) {

// Object container = element.getEClassifiers().get(i);
Object container = iter.next();
if (container instanceof EClass) {
EClass newClass = EcoreFactory.eINSTANCE.createEClass();
newClass.setName("_" + ((EClass) container).getName());
newClass.getESuperTypes().add(container);
newSubPackage.getEClassifiers().add(newClass);
} else {
EEnum tempEnum = EcoreFactory.eINSTANCE.createEEnum();
tempEnum.setName(((EEnum) container).getName());
tempEnum.getELiterals().addAll(((EEnum) container).getELiterals());
newSubPackage.getEClassifiers().add(tempEnum);
}
}


When this code is executed for the EEnum classifiers the EPackage is not
set. That is if i try to do eenum.getEPackage() it return null.


Any solutions?
Previous Topic:[Elver/Teneo] Hibernate Search (Apache Lucene) integration
Next Topic:EEnum to Epackage relationship lost
Goto Forum:
  


Current Time: Fri Apr 26 23:55:43 GMT 2024

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

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

Back to the top