changeset 28:d01cc686b54f

*** empty log message ***
author pin
date Mon, 18 Dec 2006 19:47:03 +0900
parents 971ae5cc8cde
children d2f8d056aae3
files bin/remoteeditor/editors/RemoteEditor$1.class bin/remoteeditor/editors/RemoteEditor.class bin/remoteeditor/network/REP.class src/remoteeditor/editors/RemoteEditor.java src/remoteeditor/network/REP.java src/sample/merge/Rep_Cmd.java src/sample/merge/Translate.java
diffstat 7 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
Binary file bin/remoteeditor/editors/RemoteEditor$1.class has changed
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 Dec 12 13:09:37 2006 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Mon Dec 18 19:47:03 2006 +0900
@@ -73,9 +73,8 @@
 		}else {
 			cmd = REP.REP_DELETE_CMD;
 		}
-		if(offset_con != offset) rep.sendCmd(cmd, line, length, lineText);
+		rep.sendCmd(cmd, line, length, lineText);
 		numberOfLinesOld = numberOfLinesNew;
-		offset_con = offset;
 	}
 	
 	void changeText(int kindOfCmd, int lineNo, int LineLength, String text) throws Exception{
@@ -91,7 +90,6 @@
 				}
 			}
 		});
-		offset_con = offset;
 	}
 
 	public void packetReceived(final RSocketEvent evt) {
--- a/src/remoteeditor/network/REP.java	Tue Dec 12 13:09:37 2006 +0900
+++ b/src/remoteeditor/network/REP.java	Mon Dec 18 19:47:03 2006 +0900
@@ -261,7 +261,7 @@
 
 	public void sendCmd(int cmd2, int line, int length, String lineText) {
 		//cmd = REP_INSERT_CMD;
-		rWrite(pack(cmd2, sid, eid, seqid+1, line, lineText));
+		rWrite(pack(cmd2, sid, eid, seqid, line, lineText));
 		try {
 			myCmdList.add(new Rep_Cmd(cmd2, sid, eid, seqid, line, length, lineText));
 			System.out.println("myCmdList : " + myCmdList.toString());
--- a/src/sample/merge/Rep_Cmd.java	Tue Dec 12 13:09:37 2006 +0900
+++ b/src/sample/merge/Rep_Cmd.java	Mon Dec 18 19:47:03 2006 +0900
@@ -7,7 +7,7 @@
 	public int seq;
 	public int len;
 	public int lineno;
-	public int stat;
+	public boolean stat;
 	
 	public  String string;
 	private int textsiz;
@@ -27,7 +27,7 @@
 		cmdString[6] = "REP_INSERT_CMD";
 		cmdString[9] = "REP_DELETE_CMD";
 		cmdString[13] = "REP_REPLACE_CMD";*/
-		String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz + "," + string);
+		String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz +  ", stat:" + stat + "," + string);
 		return repCmdString;
 		
 	}
--- a/src/sample/merge/Translate.java	Tue Dec 12 13:09:37 2006 +0900
+++ b/src/sample/merge/Translate.java	Mon Dec 18 19:47:03 2006 +0900
@@ -6,7 +6,7 @@
 public class Translate {
 	List <Rep_Cmd> userList;
 	List <Rep_Cmd> tokenList;
-	private int REP_IGNORE = -1;
+	private boolean REP_IGNORE = true;
 	public Translate(List<Rep_Cmd> userList, List<Rep_Cmd> tokenList){
 		this.userList = userList;
 		this.tokenList = tokenList;
@@ -22,7 +22,7 @@
 		for(Rep_Cmd userCmd:userList){
 			//Iterator tokenListIterator = tokenList.iterator();
 			//Rep_Cmd userCmd = (Rep_Cmd)userListIterator.next();
-			if(userCmd.stat == REP_IGNORE) continue;     /* νœ‚³‚κ‚ι(—\’θ)‚ΜREPƒRƒ}ƒ“ƒh‚Μ”δŠr‚Ν–³Ž‹ */
+			if(userCmd.stat) continue;     /* νœ‚³‚κ‚ι(—\’θ)‚ΜREPƒRƒ}ƒ“ƒh‚Μ”δŠr‚Ν–³Ž‹ */
 			//while(tokenListIterator.hasNext()){
 			for(Rep_Cmd tokenCmd:tokenList){
 //				Rep_Cmd tokenCmd =(Rep_Cmd)tokenListIterator.next();