Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Ignore Whitespace works incorrectly for comparison?
Ignore Whitespace works incorrectly for comparison? [message #337043] Thu, 23 July 2009 15:25
Dmitry Smirnov is currently offline Dmitry SmirnovFriend
Messages: 92
Registered: July 2009
Member
Hi,

I had encountered some problem with comparision of 2 files (or 2
revisions).

This happens if files have different line ending (one is Unix, second is
Windows).

Let's assume I have the first file as
---------------
if(A)
{
doA()
}
if(B)
{
doB()
}
if(C)
{
doC()
}

do(D)
----------------

This files have Unix-style line termination.

Second one is
-----------------
if(A)
{
doA()
}

if(C)
{
doC()
}

if(E)
{
doE()
}

do(D)
------------------
This file uses Windows-style line ending

If you try to compare these files with Eclipse, you will see that it
marked whole file as one big change. If you turn on whitespace ignoring,
it will still show some hard-to-understand difference, whereas Beyond
Compare (I suppose and most others) will show that
if(B)
{
doB()
}
was deleted and
if(E)
{
doE()
}
was inserted.

Is't this a bug? In any case, I suppose comparision should be improved in
this case...

Dmitry
Previous Topic:How to add behaviour to import wizard
Next Topic:-showlocation suggestion
Goto Forum:
  


Current Time: Tue Sep 24 18:07:06 GMT 2024

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

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

Back to the top