changeset 24:e9b015eb1e05

*** empty log message ***
author pin
date Tue, 14 Nov 2006 14:31:59 +0900
parents 24f5a9614d78
children 32b28608baa6
files bin/remoteeditor/editors/RemoteEditor.class bin/remoteeditor/network/REP.class src/remoteeditor/editors/RemoteEditor.java src/remoteeditor/network/REP.java src/sample/merge/Translate.java
diffstat 5 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
Binary file bin/remoteeditor/editors/RemoteEditor.class has changed
Binary file bin/remoteeditor/network/REP.class has changed
--- a/src/remoteeditor/editors/RemoteEditor.java	Tue Nov 14 14:31:59 2006 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Tue Nov 14 14:31:59 2006 +0900
@@ -78,9 +78,9 @@
 	}
 	
 	void replaceInsertDelete(int kindOfCmd, int lineNo, int LineLength, String text) throws Exception{
-		final int offset = document.getLineOffset(lineNo-1);
+		final int offset = document.getLineOffset(lineNo);
 		final String changedText = text;
-		final int replaceLength = document.getLineLength(lineNo-1);
+		final int replaceLength = document.getLineLength(lineNo);
 		
 		viewer.getTextWidget().getDisplay().syncExec(new Runnable() {
 			public void run() {
--- a/src/remoteeditor/network/REP.java	Tue Nov 14 14:31:59 2006 +0900
+++ b/src/remoteeditor/network/REP.java	Tue Nov 14 14:31:59 2006 +0900
@@ -117,7 +117,7 @@
 		System.out.println("read packet:" + cmd +", "+ sid +", "+ eid +", "+ seqid +", "+ lineno +", "+ textsiz +", "+ string);
 	}
 	
-	public void insert(int offset, int length, String text)  {
+/*	public void insert(int offset, int length, String text)  {
 		cmd = REP_INSERT_CMD;
 		seqid = (byte)offset;
 		try {
@@ -155,7 +155,7 @@
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
-	}
+	}*/
 	
     public ByteBuffer pack(int cmd, int sid, int eid, int seqid, int lineno, String text ) {	
     	
@@ -165,7 +165,7 @@
     	buffer.putInt(seqid); buffer.putInt(lineno); 
     	buffer.putInt(text.length()*2); 
     	//buffer.putString(text);
-    	System.out.println("pack:" + cmd +", "+ "length="+ text.length() +" "+ sid +", "+ eid +", "+ seqid +", "+ lineno);
+    	//System.out.println("pack:" + cmd +", "+ "length="+ text.length() +" "+ sid +", "+ eid +", "+ seqid +", "+ lineno);
     	
     	for(int i=0;i<text.length();i++) {
 			buffer.putChar(text.charAt(i));
--- a/src/sample/merge/Translate.java	Tue Nov 14 14:31:59 2006 +0900
+++ b/src/sample/merge/Translate.java	Tue Nov 14 14:31:59 2006 +0900
@@ -1,7 +1,6 @@
 package sample.merge;
 
 import java.util.List;
-
 import remoteeditor.network.REP;
 
 public class Translate {