Hi,
I have this code on Generator.xtend
def dispatch compile(hql.QualifiedName qualifiedName) '''
«FOR e: qualifiedName.qualifiers SEPARATOR '.'»
«e.compile»
«ENDFOR»
'''
When compiling for Generator.java, a code to insert newline is written
protected CharSequence _compile(final QualifiedName qualifiedName) {
StringConcatenation _builder = new StringConcatenation();
{
EList<QualifiedElement> _qualifiers = qualifiedName.getQualifiers();
boolean _hasElements = false;
for(final QualifiedElement e : _qualifiers) {
if (!_hasElements) {
_hasElements = true;
} else {
_builder.appendImmediate(".", "");
}
CharSequence _compile = this.compile(e);
_builder.append(_compile, "");
_builder.newLineIfNotEmpty(); // ---> This should not be here
}
}
return _builder;
}
This newLineifNotEmpty method is inserting a extra space on my string
Ex:if I have two elements on qualifiedName, like a.b, generator is writing a.<space>b
How do I guide xtend to not generate this newLineifNotEmpty call ?
thanks in advance