Community
Participate
Working Groups
Build Identifier: 2.0.0 Having following Xtend/Java classes public class DomainmodelCompiler extends XbaseCompiler { public String compile(Operation operation, ImportManager importManager) { StringBuilderBasedAppendable appendable = new StringBuilderBasedAppendable( importManager); for (JvmFormalParameter param : operation.getParameters()) { appendable.declareVariable(param, param.getName()); } return compile(operation.getBody(), appendable, operation.getReturnType()).toString(); } ... } and class DomainmodelGenerator implements IGenerator { ... @Inject extension DomainmodelCompiler xbc ... def body(Entity e, ImportManager importManager){ ''' public class «e.name» «IF e.superType != null»extends «e.superType.shortName(importManager)» «ENDIF»{ «FOR f:e.features.filter(typeof(Property))» «f.compile(importManager)» «ENDFOR» «FOR f:e.features.filter(typeof(Operation))» «f.compile(importManager)» «ENDFOR» } ''' } def compile(Operation o, ImportManager importManager) ''' public «o.returnType.shortName(importManager)» «o.name»(« o.parameterList(importManager)») { «xbc.compile(o, importManager)» } ''' ... } The problem is that «FOR f:e.features.filter(typeof(Operation))» «f.compile(importManager)» «ENDFOR» links to the compile method from the extension and not the local one Reproducible: Always
Created attachment 199488 [details] full source code
Pushed to master.
Closing all bugs that were set to RESOLVED before Neon.0