Mercurial > hg > RemoteEditor > Eclipse
diff src/pathfinder/mergetest/EditorSimulatorWithoutMerger.java @ 155:0dfb6413a31e
*** empty log message ***
author | pin |
---|---|
date | Sun, 24 Aug 2008 18:08:10 +0900 |
parents | 6a3c982bd72a |
children | 7ebd30e5e385 |
line wrap: on
line diff
--- a/src/pathfinder/mergetest/EditorSimulatorWithoutMerger.java Sun Aug 24 13:43:50 2008 +0900 +++ b/src/pathfinder/mergetest/EditorSimulatorWithoutMerger.java Sun Aug 24 18:08:10 2008 +0900 @@ -50,16 +50,15 @@ sendOneCommand(cmd, replacedText); }else if(cmd.eid == -2){ - // Merged Commands. - String replacedText = text.edit(cmd); - //sendOneCommand(cmd, replacedText); /* 終了条件 */ if (cmd.cmd==REP.SMCMD_QUIT){ ns.writeLog("\tEditor"+eid+" catch QUIT command emited by itself.", 3); running=false; break; }else{ - cs.write(new REPCommand(cmd)); + // Merged Commands. + String replacedText = text.edit(cmd); + returnMergedCommand(cmd, replacedText); } } else { @@ -73,6 +72,12 @@ } } + private void returnMergedCommand(REPCommand cmd, String replacedText) { + REPCommand command = new REPCommand(cmd); + if(command.cmd == REP.REPCMD_DELETE)command.setString(replacedText); + cs.write(command); + } + private void manage(REPCommand cmd) { // TODO Auto-generated method stub switch(cmd.cmd){