From 91873a69b84cfb925f34347ada22db532928eed2 Mon Sep 17 00:00:00 2001 From: isikm Date: Sun, 15 Jun 2008 18:32:22 +0000 Subject: introduced boolean field for splitting up operations during transformation and fixed return types of counter get-methods --- .../org/eclipse/ecf/docshare/cola/ColaUpdateMessage.java | 14 ++++++++++++-- 1 file 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; + } } -- cgit v1.2.3