Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-05-11 13:35:32 -0400
committerDani Megert2012-05-11 13:35:32 -0400
commitba8f3c1d6bfc90f4b454edbcb7e3d6579aa8dd83 (patch)
tree598462005320087169b2bd6645ac409ec11b9229
parent3a92d1b6335abeda82619a815470206de8365404 (diff)
downloadeclipse.platform.text-ba8f3c1d6bfc90f4b454edbcb7e3d6579aa8dd83.tar.gz
eclipse.platform.text-ba8f3c1d6bfc90f4b454edbcb7e3d6579aa8dd83.tar.xz
eclipse.platform.text-ba8f3c1d6bfc90f4b454edbcb7e3d6579aa8dd83.zip
linked mode
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
index 59c7311b7..5d5b11544 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
@@ -401,6 +401,10 @@ public class LinkedModeUI {
return;
}
}
+
+ // Make sure that any document change is done inside a compound change
+ beginCompoundChangeIfNeeded();
+
}
/*
@@ -501,7 +505,7 @@ public class LinkedModeUI {
if (!position.equals(fPreviousPosition))
endCompoundChange();
- beginCompoundChange();
+ beginCompoundChangeIfNeeded();
}
fPreviousPosition= position;
@@ -1208,7 +1212,7 @@ public class LinkedModeUI {
}
}
- private void beginCompoundChange() {
+ private void beginCompoundChangeIfNeeded() {
if (!fHasOpenCompoundChange) {
ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();
IRewriteTarget target= extension.getRewriteTarget();

Back to the top