Hi! I'm converting an old Xpand model-to-Java project to Xtend 2.9.1 and seem to have found a missing feature. My suggested fix would be:
In org.eclipse.xtext.common.types/model/JavaVMTypes.ecore
types.JvmEnumerationLiteral
add
parameters:JvmFormalParameter[*]
In org.eclipse.xtext.xbase.compiler.JvmModelGenerator
generateEnumLiteral(JvmEnumerationLiteral, ITreeAppendable, GeneratorConfig)
replace the TODO comment with
appendable.append("(")
generateEnumLiteralParameters(appendable, config)
appendable.append(")")
and add
def void generateEnumLiteralParameters(JvmEnumerationLiteral it, ITreeAppendable appendable, GeneratorConfig config)
based on
generateParameters(JvmExecutable it, ITreeAppendable appendable, GeneratorConfig config)
Enum literals will always be a special case because they are also instances.
Would that be all that was needed?
I'm more than happy to do this myself, what's the process?