Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318826

Summary: Comparing identical files opens editor instead of showing dialog
Product: [Eclipse Project] Platform Reporter: Daniel Alvarez Arribas <daniel.alvarez>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, h.klene, john.arthorne, mauromol, Szymon.Brandys, tomasz.zarna
Version: 3.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 275153    

Description Daniel Alvarez Arribas CLA 2010-07-04 18:02:13 EDT
Build Identifier: 20100617-1415

The documentation states that comparing two files with identical content will result in a dialog indicating that the two files are the same. 

I remember this was correct with Version 2.x of Eclipse.

The behaviour now is different: When comparing two files that are identical, a compare view is opened anyway, with both files shown and no differences marked.

I suggest updating the docs to reflect the actual system behaviour.

Reproducible: Always

Steps to Reproduce:
1. Start Eclipse Helios (I use Eclipse IDE for Java EE)
2. On the Welcome page click "Overview", then "Workbench Basics"
3. Go to Getting Started->Basic Tutorial->Comparing->Simple Compare
4. There you are.
Comment 1 Dani Megert CLA 2010-07-05 02:19:30 EDT
The dialog should come. This got broken during 3.5.
Comment 2 Tomasz Zarna CLA 2010-07-05 08:09:08 EDT
This looks like another regression introduced by bug 193324. Normally, when two files are the same, the compare editor input should return null as the computed compare result. This is no longer true for the SaveablesCompareEditorInput which returns a non-null result even though CompareEditors's state is NO_DIFF (checked here org.eclipse.compare.internal.CompareEditor.createCompareControl()).

I'm setting this bug as another blocker to bug 275153, which gathers all regressions introduced by SaveablesCompareEditorInput.
Comment 3 Tomasz Zarna CLA 2011-10-05 11:20:31 EDT
See bug 315747, comment 9 for another case when the dialog should pop up.
Comment 4 Szymon Brandys CLA 2012-03-05 05:41:04 EST
We don't have the manpower to address it at this time. Need to postpone. Let us know, if you think it is important for 3.8 and you can help with it.
Comment 5 Dani Megert CLA 2012-03-12 09:35:10 EDT
(In reply to comment #4)
> We don't have the manpower to address it at this time. Need to postpone. Let us
> know, if you think it is important for 3.8 and you can help with it.

The master bug for the regressions (bug 275153) is targeted for 3.8 M7 and this one here is a blocker for said bug.
Comment 6 Malgorzata Janczarska CLA 2012-05-31 04:05:43 EDT
*** Bug 381082 has been marked as a duplicate of this bug. ***
Comment 7 Holger Klene CLA 2012-07-08 09:22:35 EDT
Also affects the 4.2 release:
Version: 4.2.0 Build id: I20120608-1400
Comment 8 Lars Vogel CLA 2019-11-27 07:26:44 EST
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.

If you have further information on the current state of the bug, please add it.
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.

If the bug is still relevant, please remove the stalebug whiteboard tag.