Bug 176690 - [Edit] The compare editor should be reconciled with other editors
Summary: [Edit] The compare editor should be reconciled with other editors
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 61406 131900 182137 236833 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-08 03:43 EST by Guy Korland CLA
Modified: 2013-04-24 06:28 EDT (History)
10 users (show)

See Also:


Attachments
Patch v01 (6.18 KB, patch)
2009-01-14 05:08 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (52.18 KB, application/octet-stream)
2009-01-14 05:09 EST, Tomasz Zarna CLA
no flags Details
Patch_v02 (5.90 KB, patch)
2009-01-22 11:36 EST, Pawel Pogorzelski CLA
pawel.pogorzelski1: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Korland CLA 2007-03-08 03:43:06 EST
When comparing two files and changing the text outside the compare the comparison  is not refreshed.

Adding a button or a refreshing the view automatically (if possible) is needed.
Comment 1 Michael Valenta CLA 2007-04-27 15:06:55 EDT
We don't have time left in 3.3 to add enhancement so we'll need to defer this. Also, I think it would be worthwhile investigating whether we can provide an auto-reconcile instead of a refresh button.
Comment 2 Michael Valenta CLA 2007-06-19 21:50:21 EDT
*** Bug 61406 has been marked as a duplicate of this bug. ***
Comment 3 Michael Valenta CLA 2007-06-22 09:59:45 EDT
*** Bug 131900 has been marked as a duplicate of this bug. ***
Comment 4 Michael Valenta CLA 2007-06-22 10:00:23 EDT
The button shoudl be bound to F5 as well.
Comment 5 Szymon Brandys CLA 2008-04-16 07:54:53 EDT
Since the refresh button is only workaround and there is no time left to fix the general issues, I'm postponing it to 3.5.
Comment 6 Szymon Brandys CLA 2008-04-16 08:48:19 EDT
Changing the summary to better reflect the issue.
Comment 7 Szymon Brandys CLA 2008-04-16 08:48:35 EDT
*** Bug 182137 has been marked as a duplicate of this bug. ***
Comment 8 Hendrik Maryns CLA 2008-06-14 05:57:07 EDT
*** Bug 236833 has been marked as a duplicate of this bug. ***
Comment 9 Tomasz Zarna CLA 2009-01-14 05:08:58 EST
Created attachment 122516 [details]
Patch v01

Patch that adds a dialog prompting to redo diffs when Compare Editor gets focus and a change has been saved outside the Compare Editor. The fix bases on the fact that dirty state changes from true to false, however undoing the change also clears the dirty flag, but this is handled in the patch and we don't ask for the recalculation in this case.

Comment on other ideas: Recalculating the diffs automatically (on every outside change saved) is not an option since it can be a long running process. Moreover the job displays a progress dialog which should interrupt the user while working outside the compare. A refresh button is the most straightforward solution, but such button would be hard to find and use, even if we enabled it only when rediff is needed.
Comment 10 Tomasz Zarna CLA 2009-01-14 05:09:09 EST
Created attachment 122518 [details]
mylyn/context/zip
Comment 11 Eugene Kuleshov CLA 2009-01-14 08:54:10 EST
I think it would be the best to have refresh button, especially because comparison editor is often used on things that don't have local resource representation (e.g. CVS history or synchronize view). Editor already has its own toolbar and it would be natural to put refresh button in there.
Comment 12 Pawel Pogorzelski CLA 2009-01-22 11:36:37 EST
Created attachment 123391 [details]
Patch_v02

Patch from comment 9 with following changes:
1. I removed dialog that prompts for recalculation when compare editor obtains focus. Tomasz agreed on that change.
2. I added structural differences recalculation. Code from the previous patch triggered only text editor differences to be redone.
3. I changed mechanism that was used in "Set Encoding..." action to recalculate structural differences. This way the same notification facility can be used also when dealing with the case described in this bug.
4. A few other minor changes.

Code from point 2 and 3 used an notification mechanism that was not intended for this purpose. This is a separate issue and it's being tracked by bug 261199.
Comment 13 Tomasz Zarna CLA 2009-01-23 04:09:36 EST
Thanks for the patch Pawel, it's in HEAD.
Comment 14 David Balažic CLA 2009-11-25 11:26:38 EST
I found a case when this does not work.

If you think it is a separate bug, say so.

I have a project checked out from SVN.
I change a file.
In the Synchronize view I see it in the Outgoing mode and if doubleclicked, the Compare is shown.

Now if I type int he editor of the same file, the changes are immediatelly visible in Compare.

Then I close the Compare and right click the editor content and select "Compare With / Base from Working Copy".

A Compare appears showing more or less the same thing as last time.
But now if I type in the editor, the changes are not visible in the Compare. Not even if I save them in the editor (ctrl-s).

Environment:
 - Windows XP Pro SP3
 - Java(TM) SE Runtime Environment (build 1.6.0_17-b04)

Eclipse Java EE IDE for Web Developers.

Build id: 20090920-1017

  Subversive SVN Team Provider (Incubation)	0.7.8.I20090904-1300	org.eclipse.team.svn.feature.group

  JavaHL 1.6.0 Win32 Binaries (Optional)	2.2.1.I20091009-1900	org.polarion.eclipse.team.svn.connector.javahl16.win32.feature.group
Comment 15 Tomasz Zarna CLA 2009-11-30 04:54:26 EST
(In reply to comment #14)
David, if are able to get the same result using Eclipse Classic (plain Eclipse SDK[1]) feel free to open a new bug against Platform/Compare. But when it happens only when working with Subversive I would start from talking with Subversive guys[2].

[1] http://download.eclipse.org/eclipse/downloads/
[2] http://bugs.eclipse.org/bugs/enter_bug.cgi?product=Subversive
Comment 16 David Balažic CLA 2009-11-30 06:41:59 EST
(In reply to comment #15)
> (In reply to comment #14)
> David, if are able to get the same result using Eclipse Classic (plain Eclipse
> SDK[1]) 

How do I do a "Compare With / Base from Working Copy" without SVN? Using CVS? I don't have any CVS repo.
Comment 17 David Balažic CLA 2013-04-24 06:28:18 EDT
More about my issue in bug 297717