Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Controlling linefeed delimiters on Windows (\r\n vs. \n)?
Controlling linefeed delimiters on Windows (\r\n vs. \n)? [message #98768] Wed, 23 July 2003 17:04
Eclipse UserFriend
Originally posted by: gj1NOSPAM.grahamjohnson.org

The CVS FAQ (
http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform -vcm-home/docs/o
nline/cvs_features2.0/cvs-faq.html#windows_1 ) says the following:

"
How can I change the linefeed delimiter on Windows to be the *nix linefeed?

[I] Found a work around without any code changes by invoking eclipse with
this:

eclipse.exe -vmargs -Dline.separator=\n

This overrode the JVM's platform line delimiter. It works but [I] don't
[k]no[w] if there [are] any ill side affects. But [this] does help for those
windows users using eclipse with samba and [who] want *nix style linefeeds.
"

This is great, but it doesn't work. When I create a new Java class, for
example, it looks like this (all on one line, with the \n's visible):

"
/*\n * Created on Jul 23, 2003\n *\n * To change this generated comment go
to \n * Window>Preferences>Java>Code Generation>Code and Comments\n
*/\n\n/**\n * @author gjohnson\n *\n * To change this generated comment go
to \n * Window>Preferences>Java>Code Generation>Code and Comments\n
*/\npublic class Test {\n \ n \ n }\n
"

I think those command-line arguments may have worked in a previous Eclipse
version, but don't now. Is there a way to control the writing of
end-of-line characters that works in 2.1/3.0? Can the \n be escaped somehow
on the command line? Why isn't this a Preference in Eclipse as it is in any
reasonably sophisticated programmer's editor?

Also, this should obviously be removed from that FAQ document, unless
somehow it is only me for whom this doesn't work.

--
Graham Johnson
gjohnson@alpineaccess.com
Previous Topic:Re: CDT in CVS repository?
Next Topic:Newgroup problems: An update
Goto Forum:
  


Current Time: Sun May 25 23:52:56 EDT 2025

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

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

Back to the top