Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Newline Character not treated as a whitespace in file compare(Newline Character not treated as a whitespace in file compare)
Newline Character not treated as a whitespace in file compare [message #637908] Tue, 09 November 2010 10:21 Go to next message
Amardeep  is currently offline Amardeep Friend
Messages: 1
Registered: November 2010
Junior Member
I am currently running eclipse 3.2.2 Build ID - M20070212-1330. While comparing two JAVA files using the inbuilt eclipse file comparator, I observe that the tool, does not treat newline character as a whitespace character. Due to this reason

Object obj = new Object();

and

Object obj =
new Object();

gets treated as two different lines, which they are not. I have enabled "Ignore White space" option under Window > Preferences > General > Compare/Patch > General (Tab). Inspite of this, eclipse does not treat newline as a whitespace. Any suggestions or help ?
Re: Newline Character not treated as a whitespace in file compare [message #638462 is a reply to message #637908] Thu, 11 November 2010 11:15 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Amardeep wrote:
> I am currently running eclipse 3.2.2 Build ID - M20070212-1330. While
> comparing two JAVA files using the inbuilt eclipse file comparator, I
> observe that the tool, does not treat newline character as a
> whitespace character. Due to this reason
>
> Object obj = new Object();
>
> and
> Object obj = new Object();
I can't see a newline in your example. Having said that it also works
for newlines for me (3.6.1 and 3.7 M3).

Dani
>
> gets treated as two different lines, which they are not. I have
> enabled "Ignore White space" option under Window > Preferences >
> General > Compare/Patch > General (Tab). Inspite of this, eclipse does
> not treat newline as a whitespace. Any suggestions or help ?
icon5.gif  Re: Newline Character not treated as a whitespace in file compare [message #987444 is a reply to message #638462] Mon, 26 November 2012 16:09 Go to previous messageGo to next message
machinegodzilla machinegodzilla is currently offline machinegodzilla machinegodzillaFriend
Messages: 7
Registered: July 2009
Junior Member
I'm on 4.2.1.v20120814 and it does not work. Is it a regression?

I have also seen quite a few bug reports not marked as resolved that were reported before the date of the OP's post:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=203430
https://bugs.eclipse.org/bugs/show_bug.cgi?id=45857
https://bugs.eclipse.org/bugs/show_bug.cgi?id=28714
https://bugs.eclipse.org/bugs/show_bug.cgi?id=74636
Re: Newline Character not treated as a whitespace in file compare [message #987632 is a reply to message #987444] Tue, 27 November 2012 11:21 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 26.11.2012 17:09, machinegodzilla machinegodzilla wrote:
> I'm on 4.2.1.v20120814 and it does not work. Is it a regression?
"It" does work. Note that the original question was about Java compare
and not text compare and Java compare does ignore line delimiters in its
structure comparison / view. Text compare never considered line
delimiters as white space.

Dani
>
> I have also seen quite a few bug reports not marked as resolved that
> were reported before the date of the OP's post:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=203430
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=45857
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=28714
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=74636
Previous Topic:Eclipse startup time too long
Next Topic:Default Button problems on a Composite in Juno
Goto Forum:
  


Current Time: Fri Mar 29 12:28:17 GMT 2024

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

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

Back to the top