comparison test/editortest/REPEditor.java @ 420:5c95a9020e31

Modify ServerMainLoop
author one
date Fri, 13 Feb 2009 19:13:50 +0900
parents 7ff127c8ad64
children 49b689b17d06
comparison
equal deleted inserted replaced
419:7ff127c8ad64 420:5c95a9020e31
29 private REPText repText; 29 private REPText repText;
30 private boolean hasInputLock = false; 30 private boolean hasInputLock = false;
31 private boolean master; 31 private boolean master;
32 private boolean syncEnable = true; 32 private boolean syncEnable = true;
33 private LogTarget logTarget; 33 private LogTarget logTarget;
34 private int tempseq = -1;
34 35
35 public REPEditor(REPText repText, boolean master){ 36 public REPEditor(REPText repText, boolean master){
36 this.repText = repText; 37 this.repText = repText;
37 this.master = master; 38 this.master = master;
38 repText.addTextListener(this); 39 repText.addTextListener(this);
134 } 135 }
135 } 136 }
136 137
137 private void handle(REPCommand command) { 138 private void handle(REPCommand command) {
138 Logger.print(logTarget, command); 139 Logger.print(logTarget, command);
140
141 //check seq
142 if(eid == 1){
143 if(command.eid == 3){
144 if(tempseq > command.seq){
145 System.err.println(command);
146 }
147 tempseq = command.seq;
148 }
149 }
150
139 // if(inputLock) Logger.print(logTarget, command); 151 // if(inputLock) Logger.print(logTarget, command);
140 if(command == null) return; 152 if(command == null) return;
141 switch(command.cmd){ 153 switch(command.cmd){
142 case REPCMD_DELETE: 154 case REPCMD_DELETE:
143 if(command.eid != eid){ 155 if(command.eid != eid){