Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Inconsistent end-of-line with UML model editor on windows xp/windows 7(UNIX/Windows EOL wars still ask for tribute)
Inconsistent end-of-line with UML model editor on windows xp/windows 7 [message #1505044] Tue, 09 December 2014 19:58 Go to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Hello,

In our project we have a UML model stored in several .uml files, under git version control.
All development workstations have Eclipse 4.3.2 (Kepler SR2), with the corresponding UML Extender SDK feature.
Some workstations have Windows XP and some Windows 7.
We use the UML model editor to edit the model.

Since long ago, all uml files have been converted to UNIX end-of-lines, in an attempt to prevent "spurious" changes (due to end-of-line convention changes) on the different dev workstations.

All went well for some time - all UML editors preserved the UNIX EOL when editing the model.

Since not-so-long-ago, we have noticed that on the Windows 7 workstations, when changing ANY resource in the model, ALL files persisting the model are changed such that, for the persisted text content of uml:Comment/uml:Body model elements, the lines have Windows EOLs.
At the same time, the UML/Eclipse/WindowsXP installations insist in normalizing those same sections back to UNIX EOL.

I've also checked that the workspace option "EOL for new files = UNIX" is set on all workstations. (Should not matter, as no new files are created in this scenario, but who knows... )

May also be relevant - all Eclipse installations have Papyrus included - even thought we do NOT use Papyrus to edit the models.
(We've tried it once, but alternative editing with Papyrus/UML editor introduced even more non-semantic changes into the files, not only EOLs, so we decided to stick with UML Editor only ).

Additionally - we have tried before using the git core.autocrlf=auto (which potentially solves the issue) but after a lot of fight with it we declared it non-usable (with egit, at least).
(For the record: too often it resulted in states with local changes where git reset hard had no effect).

Did anyone encounter this issue before ?
Any advice would be greatly appreciated.

Regards
Vlad Gheorghe
Re: Inconsistent end-of-line with UML model editor on windows xp/windows 7 [message #1505072 is a reply to message #1505044] Tue, 09 December 2014 20:28 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5980
Registered: July 2009
Senior Member
Hi

There are arguments for both settings of core.autocrlf which I fail to
understand so I don't change it. Particularly since JGit has yet to
implement it. IMHO this is an irrelevance. It is not a CM tool's
responsibility to compensate rubbish OSes. Much better to expect to
always get exactly the same out as went in. On all platforms; i.e Unix
line endings everywhere.

GIT has exposed conversion problems that actually existed on CVS too but
less obviously. Bugs are gradually being filed and resolved to fix problems.

In principle some or all of the following decisions are made.

If a file is being updated, an unambiguous existing line ending is
preserved.

If a new file is created the propagated project defaults are used.

If a new file is created the workspace defaults are used.

Some tools just recognize that Windows line endings are an invention of
the devil and impose Unix line endings regardless.

Some tools have programmatic options.

So my primary recommendation is set all your projects to Unix, UTF-8.

Then convert all your text files to Unix, check that *.uml etc are
converted. If not raise a bugzilla.

Do a dummy edit and use the GIT stgaing view to observe the chnages. If
something changes that shouldn't raise a Bugzilla.

Regards

Ed Willink

On 09/12/2014 19:58, Vlad Gheorghe wrote:
> Hello,
>
> In our project we have a UML model stored in several .uml files, under
> git version control.
> All development workstations have Eclipse 4.3.2 (Kepler SR2), with the
> corresponding UML Extender SDK feature.
> Some workstations have Windows XP and some Windows 7.
> We use the UML model editor to edit the model.
>
> Since long ago, all uml files have been converted to UNIX end-of-lines,
> in an attempt to prevent "spurious" changes (due to end-of-line
> convention changes) on the different dev workstations.
>
> All went well for some time - all UML editors preserved the UNIX EOL
> when editing the model.
>
> Since not-so-long-ago, we have noticed that on the Windows 7
> workstations, when changing ANY resource in the model, ALL files
> persisting the model are changed such that, for the persisted text
> content of uml:Comment/uml:Body model elements, the lines have Windows
> EOLs.
> At the same time, the UML/Eclipse/WindowsXP installations insist in
> normalizing those same sections back to UNIX EOL.
>
> I've also checked that the workspace option "EOL for new files = UNIX"
> is set on all workstations. (Should not matter, as no new files are
> created in this scenario, but who knows... )
>
> May also be relevant - all Eclipse installations have Papyrus included -
> even thought we do NOT use Papyrus to edit the models. (We've tried it
> once, but alternative editing with Papyrus/UML editor introduced even
> more non-semantic changes into the files, not only EOLs, so we decided
> to stick with UML Editor only ).
>
> Additionally - we have tried before using the git core.autocrlf=auto
> (which potentially solves the issue) but after a lot of fight with it we
> declared it non-usable (with egit, at least).
> (For the record: too often it resulted in states with local changes
> where git reset hard had no effect).
>
> Did anyone encounter this issue before ?
> Any advice would be greatly appreciated.
>
> Regards
> Vlad Gheorghe
>
Re: Inconsistent end-of-line with UML model editor on windows xp/windows 7 [message #1507530 is a reply to message #1505072] Thu, 11 December 2014 18:17 Go to previous messageGo to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Hi Ed,

Thanks a lot for the help !

I followed your advice - set project settings to UNIX EOL, normalize all files to UNIX EOL.

It is reproducible - on UML/Eclipse (4.3.2)/Windows7 any dummy change to OUR model results in modifying all EOL to Windows, but only inside the <body> tags (the serialization of uml::Comment.body).

I will file a bug as soon as I get some time to isolate a minimal test case.

Kind regards
Vlad

Re: Inconsistent end-of-line with UML model editor on windows xp/windows 7 [message #1507661 is a reply to message #1507530] Thu, 11 December 2014 20:46 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5980
Registered: July 2009
Senior Member
Hi

Sounds familiar. Maybe I already raised it.

Regards

Ed Willink

On 11/12/2014 18:17, Vlad Gheorghe wrote:
> Hi Ed,
>
> Thanks a lot for the help !
>
> I followed your advice - set project settings to UNIX EOL, normalize all
> files to UNIX EOL.
>
> It is reproducible - on UML/Eclipse (4.3.2)/Windows7 any dummy change to
> OUR model results in modifying all EOL to Windows, but only inside the
> <body> tags (the serialization of uml::Comment.body).
>
> I will file a bug as soon as I get some time to isolate a minimal test
> case.
>
> Kind regards
> Vlad
>
>
Previous Topic:Auto imports org.eclipse.uml2.uml
Next Topic:Rich Text Editor for SysML Comments
Goto Forum:
  


Current Time: Sat Jul 21 21:25:01 GMT 2018

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

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

Back to the top