Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorisikm2008-06-15 14:32:22 -0400
committerisikm2008-06-15 14:32:22 -0400
commit91873a69b84cfb925f34347ada22db532928eed2 (patch)
tree71e65dc7e74b16d4bf48d9ba0aff9c1c63fb089b
parent553bd0e32ed36a6b56d83fa1f12a4aa0adf7861a (diff)
downloadorg.eclipse.ecf-91873a69b84cfb925f34347ada22db532928eed2.tar.gz
org.eclipse.ecf-91873a69b84cfb925f34347ada22db532928eed2.tar.xz
org.eclipse.ecf-91873a69b84cfb925f34347ada22db532928eed2.zip
introduced boolean field for splitting up operations during transformation and fixed return types of counter get-methods
-rw-r--r--framework/bundles/org.eclipse.ecf.docshare/src/org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/bundles/org.eclipse.ecf.docshare/src/org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java b/framework/bundles/org.eclipse.ecf.docshare/src/org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java
index be892f4bb..543c9d4b5 100644
--- a/framework/bundles/org.eclipse.ecf.docshare/src/org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java
+++ b/framework/bundles/org.eclipse.ecf.docshare/src/org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java
@@ -25,11 +25,13 @@ public class ColaUpdateMessage extends UpdateMessage {
private final long localOperationsCount;
private long remoteOperationsCount;
private final TransformationStrategy trafoStrat;
+ private boolean splitUp;
public ColaUpdateMessage(UpdateMessage msg, long localOperationsCount, long remoteOperationsCount) {
super(msg.getOffset(), msg.getLengthOfReplacedText(), msg.getText());
this.localOperationsCount = localOperationsCount;
this.remoteOperationsCount = remoteOperationsCount;
+ this.splitUp = false;
if (super.getLengthOfReplacedText() == 0) {
// this is neither a replacement, nor a deletion
trafoStrat = ColaInsertion.getInstance();
@@ -54,11 +56,11 @@ public class ColaUpdateMessage extends UpdateMessage {
return (this.trafoStrat instanceof ColaDeletion);
}
- public double getLocalOperationsCount() {
+ public long getLocalOperationsCount() {
return this.localOperationsCount;
}
- public double getRemoteOperationsCount() {
+ public long getRemoteOperationsCount() {
return this.remoteOperationsCount;
}
@@ -77,4 +79,12 @@ public class ColaUpdateMessage extends UpdateMessage {
buf.append(";remote=").append(getRemoteOperationsCount()).append("]]"); //$NON-NLS-1$//$NON-NLS-2$
return buf.toString();
}
+
+ public void setSplitUp(boolean toBeSplitUp) {
+ this.splitUp = toBeSplitUp;
+ }
+
+ public boolean isSplitUp() {
+ return splitUp;
+ }
}

Back to the top