aniatbr / spray

Automatically exported from code.google.com/p/spray
0 stars 0 forks source link

Bug in Xcore initializer and fix #325

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

the class org.eclipselabs.spray.xtext.util.GenModelHelper contains a bug in 
#getGenModel(EClassifier eClassifier).

 EObject root = res.getContents().get(0);
        if (root instanceof XPackage) {
            genModel = xcoreGenModelBuilder.getGenModel((XPackage) root);
            // TODO - report bug to spray
            xcoreGenModelInitializer.initialize(genModel, true);
        } else {
            genModel = (GenModel) res.getContents().get(0);
        }
        return genModel;

After "xcoreGenModelBuilder.getGenModel(" the xcoreGenModelInitializer needs to 
be called. Otherwise the XAnnotations are not processed and the generator 
generates wrong EPackage- and EFactory-Names.

Best, Florian

Original issue reported on code.google.com by Florian....@gmail.com on 28 May 2014 at 6:54

GoogleCodeExporter commented 8 years ago
Thanks for your fix, Xcore support is still work progress. Eventually I also 
want to replace the current GenModel API usage by the Xcore API, so instead 
converting Xcore to GenModel, GenModels should be converted to Xcore. And as 
Graphiti is also able to work with pure Java POJOs 
(http://www.eclipse.org/forums/index.php/t/266445/) this should also harmonized 
in one API.

Original comment by de.abg.r...@gmail.com on 1 Jun 2014 at 9:05