changeset 26:b5493a5932ac

*** empty log message ***
author pin
date Tue, 12 Dec 2006 12:36:42 +0900
parents 32b28608baa6
children 971ae5cc8cde
files bin/remoteeditor/editors/RemoteEditor$1.class bin/remoteeditor/editors/RemoteEditor.class src/remoteeditor/editors/RemoteEditor.java src/sample/merge/Translate.java
diffstat 4 files changed, 5 insertions(+), 4 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
--- a/src/remoteeditor/editors/RemoteEditor.java	Thu Nov 16 08:39:41 2006 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Tue Dec 12 12:36:42 2006 +0900
@@ -19,6 +19,7 @@
 	private IDocument document;
 	REP rep;
 	int numberOfLinesOld;
+	int offset_con;
 
 	public RemoteEditor() {
 		super();
@@ -50,7 +51,7 @@
 		System.out.println("input = " + inputText + " : " + inputText.length());
 		
 		int line = 0;
-		int offset;
+		int offset = 0;
 		int length = 0;
 		int cmd = 0;
 		int numberOfLinesNew = 0;
@@ -72,15 +73,16 @@
 		}else {
 			cmd = REP.REP_DELETE_CMD;
 		}
-		rep.sendCmd(cmd, line, length, lineText);
+		if(offset_con != offset) rep.sendCmd(cmd, line, length, lineText);
 		numberOfLinesOld = numberOfLinesNew;
+		offset_con = offset;
 	}
 	
 	void changeText(int kindOfCmd, int lineNo, int LineLength, String text) throws Exception{
 		final int offset = document.getLineOffset(lineNo);
 		final String changedText = text;
 		final int replaceLength = document.getLineLength(lineNo);
-		
+		offset_con = offset;
 		viewer.getTextWidget().getDisplay().syncExec(new Runnable() {
 			public void run() {
 				try {
--- a/src/sample/merge/Translate.java	Thu Nov 16 08:39:41 2006 +0900
+++ b/src/sample/merge/Translate.java	Tue Dec 12 12:36:42 2006 +0900
@@ -25,7 +25,6 @@
 			if(userCmd.stat == REP_IGNORE) continue;     /* νœ‚³‚κ‚ι(—\’θ)‚ΜREPƒRƒ}ƒ“ƒh‚Μ”δŠr‚Ν–³Ž‹ */
 			//while(tokenListIterator.hasNext()){
 			for(Rep_Cmd tokenCmd:tokenList){
-				if(userCmd.toString().equals(tokenCmd.toString())) tokenList.remove(tokenCmd); 
 //				Rep_Cmd tokenCmd =(Rep_Cmd)tokenListIterator.next();
 				if(tokenCmd.stat == REP_IGNORE) continue;     /* νœ‚³‚κ‚ι(—\’θ)‚ΜREPƒRƒ}ƒ“ƒh‚Μ”δŠr‚Ν–³Ž‹ */
 				if(userCmd.stat == REP_IGNORE) break;