Community
Participate
Working Groups
Build Identifier: 20100617-1415 Templates that worked under XPand 0.7.x doesn't work under 1.0.1. The problem was discussed on the mailing list (http://www.eclipse.org/forums/index.php?t=msg&th=201339&start=0&S=799a81ddc445ba30d85b940956ec7659) and assumed as a bug. It is a strange error, to drill it down, here the minimal samle. If a have a template like this, everything works fine: «REM» Performs the generation of javadoc comments works not deterministic «ENDREM» «IMPORT gcore» «DEFINE Root FOR MModel -» «ENDDEFINE» If I change just the words in the third line of the comment, so the template appears as follows, it doesn't work anymore: «REM» Performs the generation of javadoc comments i dont understand it «ENDREM» «IMPORT gcore» «DEFINE Root FOR MModel -» «ENDDEFINE» However, I found a general workaround to move the import statement before the comment, so the template is again working correctly: «IMPORT gcore» «REM» Performs the generation of javadoc comments i dont understand it «ENDREM» «DEFINE Root FOR MModel -» «ENDDEFINE» I can even write this and it works fine: «REM» Performs the generation of javadoc comments works not determini'stic «ENDREM» «IMPORT gcore» «DEFINE Root FOR MModel -» «ENDDEFINE» I can successfully parse all the templates which results on errors during execution using the XpandParseFacade. Please find a minimal project in the attached workspace. Reproducible: Always Steps to Reproduce: You will find 5 launch configurations there, 4 to execute workflows showing the problem and one for a junit test: 1. start the mwe workflow file 'workflowError' to get the error 2. start the mwe workflow file 'workflowWorking' to start the working template 3. start the mwe workflow file 'workflowWorkingToo' to start the other working template 4. start the mwe workflow file 'workflowErrorWorking' to start the template with the workaround 5. start the junit test to verify that the erroneous tempalte can be parsed successfully
Created attachment 187222 [details] a zipped workspace containing one minimal example project with the error You will find 5 launch configurations there, 4 to execute workflows showing the problem and one for a junit test: 1. start the mwe workflow file 'workflowError' to get the error 2. start the mwe workflow file 'workflowWorking' to start the working template 3. start the mwe workflow file 'workflowWorkingToo' to start the other working template 4. start the mwe workflow file 'workflowErrorWorking' to start the template with the workaround 5. start the junit test to verify that the erroneous tempalte can be parsed successfully
The input file encoding must be set to make it deterministic, see "Encoding" chapter in Xpand manual. <component class="org.eclipse.xpand2.Generator"> ... <resourceManager class ="org.eclipse.xtend.expression.ResourceManagerDefaultImpl"> <fileEncoding value="UTF-8"/> </resourceManager>
Requested via bug 522520. -M.