Bug 131895 - [Edit] Undo in compare
Summary: [Edit] Undo in compare
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 33665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-15 05:59 EST by Stephan Strittmatter CLA
Modified: 2007-06-05 15:25 EDT (History)
3 users (show)

See Also:


Attachments
correct undo/redo for all file types (7.52 KB, patch)
2006-09-11 10:16 EDT, Max Weninger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Strittmatter CLA 2006-03-15 05:59:47 EST
It is not possible to undo a copy in the compare view.
If you copied something by accident from the wrong side, you have to cancel the complete compare session, because undo is not supported.
Comment 1 Max Weninger CLA 2006-09-11 10:16:47 EDT
Created attachment 49829 [details]
correct undo/redo for all file types

see also bug nr 33665
Comment 2 Michael Valenta CLA 2006-09-11 10:33:05 EDT
Thanks for the patch.
Comment 3 Max Weninger CLA 2006-09-11 11:52:12 EDT
Some comments on that last patch
This fixes the undo/redo is available for all text files
And this fixes some problems that the undo/redo menu
is correctly enabled/disabled
Comment 4 Michael Valenta CLA 2006-09-11 11:57:05 EDT
I have a problem with the patch. It provides an implementation for a method
that was previously empty (TextMergeViewer#configureTextViewer). This is OK for
the Java merge viewer since it doesn't call the inherited version. However, if
other subclasses did include a super call and called configure on the source
viewer, they could run into problems (i.e. you can only call configure again if
you call unconfigure first). We could probably get around this by overriding
the configure method of MergeSourceViewer to do the unconfigure if it gets
reconfigured.
Comment 5 Max Weninger CLA 2006-09-11 12:02:38 EDT
true 

I can remember that I did have such a call to unconfigure
at some time but I must have removed it by unknown reason :-)
Comment 6 Michael Valenta CLA 2006-09-11 12:03:14 EDT
I have overridden configure in the MergeSourceViewer to do what I suggested in
my previous comment. According to the spec of ISourceViewer, this should be
enough. I have released the patch to HEAD with the following copyright added to
the files. If the copyright needs to b changed, let me know.

Max Weninger (max.weninger@windriver.com) - Bug 131895 [Edit] Undo in compare
Comment 7 Max Weninger CLA 2006-09-11 13:53:29 EDT
BTW: you may want to set 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=33665
to a duplicate of this
Comment 8 Michael Valenta CLA 2006-09-11 14:05:34 EDT
*** Bug 33665 has been marked as a duplicate of this bug. ***
Comment 9 Michael Valenta CLA 2006-09-19 15:00:38 EDT
Verified fixed in I20060919-0010