summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Aniola2013-04-23 11:26:19 (EDT)
committer Dani Megert2013-04-23 11:26:19 (EDT)
commit2d3e21f97bf11d1bb5abb7fc1a426d2f2b377a54 (patch)
treea6da7637978e7b214f728063a19a2b2d1b7fa40a
parent35f1b3a99bb4dcc042cd007a14103e5707eec5e3 (diff)
downloadeclipse.platform.team-2d3e21f97bf11d1bb5abb7fc1a426d2f2b377a54.zip
eclipse.platform.team-2d3e21f97bf11d1bb5abb7fc1a426d2f2b377a54.tar.gz
eclipse.platform.team-2d3e21f97bf11d1bb5abb7fc1a426d2f2b377a54.tar.bz2
Fixed bug 405290: Undo-ing to the point where the compare editor is not dirty leaves you with no easy way to recalculate diffsI20130430-0800I20130430-0031I20130429-2000I20130429-0800I20130428-2000
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index fcdc3ed..e0ac759 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -2998,7 +2998,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
*/
private void documentChanged(DocumentEvent e, boolean dirty) {
- IDocument doc= e.getDocument();
+ final IDocument doc= e.getDocument();
if (doc == fLeft.getSourceViewer().getDocument()) {
setLeftDirty(dirty);
@@ -3007,8 +3007,19 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
}
if (!isLeftDirty() && !isRightDirty()) {
fRedoDiff = false;
+ new UIJob(CompareMessages.DocumentMerger_0) {
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (!getControl().isDisposed()) {
+ doDiff();
+ invalidateLines();
+ updateLines(doc);
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ } else {
+ updateLines(doc);
}
- updateLines(doc);
}
/*