Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » JET keeps recreating template classes without modifications(JET Behavior)
JET keeps recreating template classes without modifications [message #1831335] Mon, 17 August 2020 15:44 Go to next message
Dennis Jurgensen is currently offline Dennis JurgensenFriend
Messages: 1
Registered: August 2020
Junior Member
We are using JET with models and templates for a project. We have 4 templates for EnumObjects, JsonObjects, POM, and Manifests. All are constantly being created, i.e. they show up as Unresolved changes. If I check them in and deliver them to the build stream, I have 4 new Unresolved changes to checkin, over and over again. If I look at the changes in the compare editor I see that the files look the same except for a grey highlighting for leading spaces and sometimes a trailing space for lines. Eclipse compare editor must think they are different, however, if I copy and paste both the local and remote versions to an editor like BBedit it says that the copies are identical.
If I tell the Compare Editor to ignore whitespace then it still shows the two files but indicate that there are no java structural differences. Still if I ask Eclipse to undo the changes, then they just re-appear.

What could be going on and how can I fix it so I don't get Unresolved changes for these files.
EnumObject.txtjet -> EnumTemplate.java
JsonObject.txtjet -> JsonTemplate.java
Manifest.txtjet -> ManifestTemplate.java
POM.txtjet -> POMTemplate.java
Thanks
Re: JET keeps recreating template classes without modifications [message #1831358 is a reply to message #1831335] Tue, 18 August 2020 04:34 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Most likely the problem is inconsistent new-line characters for which different tools have different priorities/blindness to
- built-in config
- prevailing file content
- project settings
- workspace settings
- system settings
If you set project settings to Unix/UTF-8 many problems go away.
There is a magic auto-crlf GIT setting that some users advocate to ensure that Unix/Windows users co-exist. I fail to understand it. It seems philosophically wrong to have a GIT tool that returns variant content. Let all users use Unix line endings; they work on Windows and save space/confusion.
I have given up reporting bugs in tools that get it wrong. Many remain unfixed. Instead I run
https://git.eclipse.org/r/plugins/gitiles/ocl/org.eclipse.ocl/+/refs/heads/master/examples/org.eclipse.ocl.examples.build/src/org/eclipse/ocl/examples/build/utilities/ConvertToUnixLineEndings.java
at the end of my MWE2 workflows. Line endings was the original target, but it does some whitespace rationalization too.

Regards

Ed Willink
Previous Topic:Best Model-to-text transformation tool
Next Topic:Acceleo
Goto Forum:
  


Current Time: Fri Apr 26 23:28:11 GMT 2024

Powered by FUDForum. Page generated in 0.02837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top