aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Aniola2013-02-28 04:54:49 (EST)
committerMalgorzata Janczarska2013-02-28 04:54:49 (EST)
commit57c9a3c07c972dd980fa8b106c4b1b94156f9651 (patch)
treef6592772ac2fd7af8173ca40f8e35f49e87c3fad
parent55981afe29f9a8b0f96c01c204fa741932d7b3d1 (diff)
downloadeclipse.platform.team-57c9a3c07c972dd980fa8b106c4b1b94156f9651.zip
eclipse.platform.team-57c9a3c07c972dd980fa8b106c4b1b94156f9651.tar.gz
eclipse.platform.team-57c9a3c07c972dd980fa8b106c4b1b94156f9651.tar.bz2
Bug 216407 - [Edit] "Copy Current from Right to Left" doesn't work whenv20130228-095449
triggered after Undo
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java17
1 files changed, 13 insertions, 4 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 727a079..28ee9c1 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
@@ -2986,9 +2986,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
* Implements IDocumentListener.
*/
private void documentChanged(DocumentEvent e, boolean dirty) {
-
- IDocument doc= e.getDocument();
-
+
+ final IDocument doc = e.getDocument();
+
if (doc == fLeft.getSourceViewer().getDocument()) {
setLeftDirty(dirty);
} else if (doc == fRight.getSourceViewer().getDocument()) {
@@ -2997,7 +2997,16 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
if (!isLeftDirty() && !isRightDirty()) {
fRedoDiff = false;
}
- updateLines(doc);
+
+ new UIJob(CompareMessages.DocumentMerger_0) {
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ doDiff();
+ invalidateLines();
+ updateLines(doc);
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+
}
/*