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
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 =;
if (container instanceof EClass) {
EClass newClass = EcoreFactory.eINSTANCE.createEClass();
newClass.setName("_" + ((EClass) container).getName());
} else {
EEnum tempEnum = EcoreFactory.eINSTANCE.createEEnum();
tempEnum.setName(((EEnum) container).getName());
tempEnum.getELiterals().addAll(((EEnum) container).getELiterals());

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: Sun Nov 29 19:51:35 GMT 2020

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

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

Back to the top