escaping string literals [message #251301] |
Thu, 07 February 2008 19:49  |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
I've got the "escape when pasting into string literals" setting checked in
the Java Editor configuration. So, when I paste multiline text into a
string literal in a Java editor, the editor helpfully escapes the string,
putting \ before any nested ", breaking newlines into multiple literals with
+ between them, and so forth.
However, all the newlines are escaped as '\r\n' rather than just '\n'.
It doesn't seem to matter what source I'm pasting from: I've tried copying
from the debug console, from Notepad, etc. So I don't think it's anything
special about the contents of the clipboard.
This is happening on Eclipse 3.3 and 3.4, latest builds of each, on Windows
XP.
Is there any way to make it paste just '\n', rather than '\r\n'?
Thanks!
|
|
|
Re: escaping string literals [message #251310 is a reply to message #251301] |
Fri, 08 February 2008 05:36  |
Eclipse User |
|
|
|
Walter Harley wrote:
>I've got the "escape when pasting into string literals" setting checked in
>the Java Editor configuration. So, when I paste multiline text into a
>string literal in a Java editor, the editor helpfully escapes the string,
>putting \ before any nested ", breaking newlines into multiple literals with
>+ between them, and so forth.
>
>However, all the newlines are escaped as '\r\n' rather than just '\n'.
>
>It doesn't seem to matter what source I'm pasting from: I've tried copying
>from the debug console, from Notepad, etc. So I don't think it's anything
>special about the contents of the clipboard.
>
>This is happening on Eclipse 3.3 and 3.4, latest builds of each, on Windows
>XP.
>
>Is there any way to make it paste just '\n', rather than '\r\n'?
>
>
Nope. We use the line delimiter that's used in the document you're editing.
Dani
>Thanks!
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02721 seconds