|
Re: [ATL] problem running ATL programmatically [message #831740 is a reply to message #831701] |
Thu, 29 March 2012 05:21   |
Eclipse User |
|
|
|
I made a quick fix: (the fix is in bold)
private void initClassifiers(Iterator i, Map allClassifiers, String base) {
for ( ; i.hasNext();) {
EObject eo = (EObject)i.next();
if (eo instanceof EPackage) {
String name = ((EPackage)eo).getName();
if (base != null) {
name = base + "::" + name;
}
initClassifiers(((EPackage)eo).eContents().iterator(), allClassifiers, name);
} else if (eo instanceof EClassifier) {
String name = ((EClassifier)eo).getName();
// register the classifier under its simple name
register(allClassifiers, name, eo);
if (base != null) {
name = base + "::" + name;
// register the classifier under its full name
register(allClassifiers, name, eo);
}
}else if(eo instanceof DynamicEObjectImpl) {
initClassifiers(((DynamicEObjectImpl)eo).eClass().getEPackage().eContents().iterator(), allClassifiers, base)
} else {
// No meta-package or meta-class => just keep digging.
// N.B. This situation occurs in UML2 profiles, where
// EPackages containing EClasses are buried somewhere
// underneath other elements.
initClassifiers(eo.eContents().iterator(), allClassifiers, base);
}
}
}
I just don't know how can I repackage and try it, any help welcome, and also any suggestions about this fix.
[Updated on: Thu, 29 March 2012 05:21] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04887 seconds