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 11:25
Dmitry Smirnov is currently offline Dmitry Smirnov
Messages: 90
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: Mon Jul 28 04:36:14 EDT 2014

Powered by FUDForum. Page generated in 0.02043 seconds