Bug 368471 - Change marking in CompareEditor cover too much
Summary: Change marking in CompareEditor cover too much
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 12:18 EST by David Balažic CLA
Modified: 2020-08-02 04:19 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of problem (28.18 KB, image/png)
2012-01-12 12:18 EST, David Balažic CLA
no flags Details
Screenshot of problem (11.98 KB, image/png)
2013-10-08 11:59 EDT, David Balažic CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Balažic CLA 2012-01-12 12:18:03 EST
Build Identifier: Version: Indigo Service Release 1 Build id: 20110916-0149

In Compare Editor sometimes too many characters are marked as chenged (even if they are not).

See screenshot.

The '/>' part in the last line is higlighted on the left side, even if is is not a change. Interestingly a very similar change (removed '</a>' text) in the lines before that are correctly marked (just the 3 removed characters are highlighted on the right pane).

For reference, the text is:
left (Local):
	<img src="<c:url value='/images/xxx.gif'/>" hspace="47" width="200"/>
right (remote BASE):
	<a href=""><img src="<c:url value='/images/ess.gif'/>" hspace="47" width="200"/></a>

The plugin spy says:
Active Part (Default Compare Editor)
The active editor class:
CompareEditor
The contributing plug-in:
org.eclipse.compare (3.5.201.R37x_v20110817-0800)
The active editor identifier:
org.eclipse.compare.CompareEditor
The active menu contribution identifiers:
org.eclipse.compare.CompareEditor

The compared file is checked out from a SVN repository and after changing it I selected the context menu item Compare With / Base Revision.

The SVN plugin is:
  Subclipse (Required)	1.8.4	org.tigris.subversion.subclipse.feature.group	tigris.org


Reproducible: Didn't try
Comment 1 David Balažic CLA 2012-01-12 12:18:54 EST
Created attachment 209393 [details]
Screenshot of problem
Comment 2 Malgorzata Janczarska CLA 2012-01-13 05:50:15 EST
I created two text files containing lines from comment 0 and compared them with each other. I get the same result as in attachment 209393 [details]. I played a little with the content and noticed that if, after /> I add an alphanumeric character or white space and then some text it's not marked as a change, but when I add non-alphanumeric as <>/+_ etc. than I get the whole sequence as change. It seems to me that compare editor tries to form the content in words and a sequence of non-alphanumeric characters is treated as one word.
Comment 3 Holger Klene CLA 2012-07-08 09:42:28 EDT
Duplicate of bug 216707
Comment 4 David Balažic CLA 2013-10-08 11:59:00 EDT
Created attachment 236228 [details]
Screenshot of problem

I still see this with Eclipse 4.3.1 (Kepler SR1), while bug 216707 was marked FIXE years ago.

As I did not have the files from the original report, I just created two files dummy.txt and dummy.xml and put this contents in them:

dummy.txt:
/images/xxx.gif'/>" hspace="47" width="200"/>
abc
def

blahblah....
(more lines of different text)

dummy.xml:
/images/ess.gif'/>" hspace="47" width="200"/></a>
abc
def

foo_bar_baz...
also some more lines


Then I selected both and did Compare With / Each Other

Again, the same problem happens as in original report. Screenshot attached
Comment 5 Eclipse Genie CLA 2020-08-01 18:57:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 David Balažic CLA 2020-08-02 04:19:52 EDT
this still happens in this version:

Eclipse IDE for Enterprise Java Developers (includes Incubating components)

Version: 2020-06 (4.16.0)
Build id: 20200615-1200