Mercurial > hg > RemoteEditor > REPSessionManager
view test/mergertest/RemoteEditorSimulator.java @ 491:5945266c970d
before unMergedCmds fix , deadlockTimer API
author | one |
---|---|
date | Sat, 23 Oct 2010 12:34:46 +0900 |
parents | 5c95a9020e31 |
children |
line wrap: on
line source
package test.mergertest; import java.util.List; import rep.REP; import rep.REPCommand; import test.editortest.Logger; import test.editortest.REPText; public class RemoteEditorSimulator { private REPText repText; private int eid; public RemoteEditorSimulator(int eid){ this.eid = eid; repText = new REPTextWithLinkedList(); } public void edit(REPCommand command) { Logger.print(command); if(command.cmd == REP.REPCMD_INSERT_USER){ repText.insert(command.lineno, command.string); }else if(command.cmd == REP.REPCMD_DELETE_USER){ repText.delete(command.lineno); } } public int getEID() { return eid; } public void display() { List<String> list = repText.list(); System.out.println(); System.out.println("---------- Editor" + eid + " ----------"); for(String str : list){ System.out.println(str); } } }