xtend template generator not working in deployed app [message #1811087] |
Mon, 26 August 2019 17:48  |
Eclipse User |
|
|
|
Why would a deployed app be able to run it's generator, but have it's xtend templates not get interpreted?
For example, my generated outputs look like copies of my xtend generator:
??FOR connBundle : PBXAppImpl.getInstance().connectionBundles??
connBundle: ??connBundle.name??
??FOR conn : connBundle.connections??
conn: ??conn.name?? @??conn.hashCode??:
src: ??FOR src : conn.sources?? ??src.name?? ??ENDFOR??
dest: ??FOR dest : conn.destinations?? ??dest.name?? ??ENDFOR??
??ENDFOR??
??ENDFOR??
I've never seen this before, but it's now happening in both my Run Configuration in Eclipse and in my deployed application (whose target is set up with Tycho/Maven).
Xtext 2.14 (installed over 2.12)
|
|
|
|
Re: xtend template generator not working in deployed app [message #1811089 is a reply to message #1811088] |
Mon, 26 August 2019 18:04   |
Eclipse User |
|
|
|
Thank you for helping.
Possibly not. You are talking about the Project created in the user's workspace with the deployed application right?
What should the encoding be?
I'm using the New Project Wizard provided with 2.14 and I had to make a small tweak in that release code to include
projectNatures += #[XtextProjectHelper.NATURE_ID]
builderIds += org.eclipse.xtext.ui.XtextProjectHelper.BUILDER_ID
into the the generateProjects method of the wizard template
Should I be adding a friendly encoding there too somehow?
|
|
|
|
|
Re: xtend template generator not working in deployed app [message #1811158 is a reply to message #1811091] |
Tue, 27 August 2019 19:42  |
Eclipse User |
|
|
|
Thank you for the pointers. It looks like changing the workspace/project text encoding property to UTF-8 was key. I had already changed it for the xtend file in my generator to get it to work, but there needed to be more done.
Doing this in my developer workspace got the Run Config test launch working again.
I also seemed to need to tweak my tycho/maven dsl.parent pom to include:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Doing that helped get my deployed application working again.
|
|
|
Powered by
FUDForum. Page generated in 0.06048 seconds