Saving self-written code - xtend

試著忘記壹切 提交于 2019-12-08 06:43:09

问题


I want to know if it is possible to save self-written code within a generated file. If you change the model and then push the save button, all code is overwritten. I want to save some of the code of the old file.


回答1:


Xtend uses a source generating compiler thus the produced Java code for Xtend itself cannot be altered on the source level.

Nevertheless, if you use Xtend's template expression to generate code, you can of course insert protected regions to allow users to modify the generated code. This OS project on Github implements support for protected regions in Xtend.



来源:https://stackoverflow.com/questions/14263790/saving-self-written-code-xtend

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!