Mercurial > hg > RemoteEditor > Eclipse
view src/rep/REPCommand.java @ 203:fce2776071d4
package rep copy
author | one |
---|---|
date | Sat, 18 Dec 2010 13:18:54 +0900 |
parents | 3133040ee4f4 |
children |
line wrap: on
line source
package rep; import rep.REP; public class REPCommand { public REP cmd; public int sid; public int eid; public int seq; public int len; public int lineno; public String string; // if this command is an undo command, it has it's original public REPCommand original; public REPCommand(REP cmd,int sid,int eid, int seq, int lineno, String string) { this.cmd = cmd; this.sid = sid; this.eid = eid; this.seq = seq; this.lineno = lineno; this.string = string; this.original = null; } public REPCommand(REPCommand cmd){ this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, cmd.string); } public REPCommand() { } public REPCommand(int cmd, int sid, int eid, int seq, int lineno, int textsiz, String string) { this.cmd = REP.newREP(cmd); this.sid = sid; this.eid = eid; this.seq = seq; this.lineno = lineno; this.string = string; this.original = null; } public String toString(){ String repCmdString = cmd + ",sid=" + sid + ",eid=" + eid + ",seq=" + seq + ",lineno=" + lineno ; if (string!=null) repCmdString += ",sz=" + string.length() +"," + string; return repCmdString; } public void setEID(int eid2) { this.eid = eid2; } public void setCMD(REP cmd2) { this.cmd = cmd2; } public void setSID(int sessionID) { this.sid = sessionID; } public void setString(String string2) { string = string2; } public void setSEQID(int i) { seq = i; } public boolean isSameSeq(REPCommand commit) { return seq==commit.seq && sid==commit.sid && eid==commit.eid; } }