This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 30531 - Don't highlight the whole line when only interior is different
Summary: Don't highlight the whole line when only interior is different
Status: VERIFIED DUPLICATE of bug 26182
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: diff-issues@utilities
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-30 18:38 UTC by Torbjorn Norbye
Modified: 2003-02-03 08:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2003-01-30 18:38:56 UTC
I'm using the graphical differ. On some lines only
a character has changed (for example the last
digit in a year in the copyright), or some
additional whitespace characters have been added.

The diff viewer shows the entire line as
different, highlighting both the old and new line
in blue.

It would be nice if it would highlight only the
parts where they differ. Then I can immediately
spot the difference.

Note that this does not mean you have to do
sub-line diffing; keep your current line oriented
diff algorithms. All you have to do is change the
code which creates the highlighting on the lines:
start from the beginning of both strings and find
the first index where the two differ. Then start
from the end of both strings and find the first
index where they differ.  Now highlight this range
in each view (the first index will be the same,
the last index may be different if the two line
lengths are different).
Comment 1 Torbjorn Norbye 2003-01-30 19:08:01 UTC
Accidentally filed with category graphics - should be code.
Comment 2 Martin Entlicher 2003-01-31 16:43:55 UTC
Yes, this would be a really good improvement. It is already planned
for 4.0 release in issue #26182, though I'm not sure there will be
enough time to implement it, because projects and performance have
higher priority.

BTW: there is already API for it (see org.netbeans.api.diff.Difference
and org.netbeans.api.diff.Difference.Part in
http://www.netbeans.org/download/dev/javadoc/DiffAPIs/index.html).
However it's not yet supported by the diff engines and visualizers.


*** This issue has been marked as a duplicate of 26182 ***
Comment 3 Jiri Kovalsky 2003-02-03 08:07:40 UTC
Verified as duplicate.