Mercurial > hg > RemoteEditor > Eclipse
changeset 15:535f124c2fc3
*** empty log message ***
author | pin |
---|---|
date | Mon, 23 Oct 2006 02:50:36 +0900 |
parents | 0ac009f1c69e |
children | b8f407692ecf |
files | src/remoteeditor/editors/RemoteEditor.java src/remoteeditor/network/REP.java src/remoteeditor/network/RSocketEvent.java |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/remoteeditor/editors/RemoteEditor.java Mon Oct 23 02:26:26 2006 +0900 +++ b/src/remoteeditor/editors/RemoteEditor.java Mon Oct 23 02:50:36 2006 +0900 @@ -74,11 +74,11 @@ public void packetReceived(RSocketEvent evt) { - final int offset = evt.getOffset(); + final int offset = evt.getLineNo(); final int length = evt.getLength(); final String text = evt.getText(); System.out.println(offset + " : " + length); - if(textOffset != offset){ + if(evt.getCmd() == REP.REP_INSERT_CMD && evt.getSeqId() != 1){ viewer.getTextWidget().getDisplay().syncExec(new Runnable() { public void run() { try {
--- a/src/remoteeditor/network/REP.java Mon Oct 23 02:26:26 2006 +0900 +++ b/src/remoteeditor/network/REP.java Mon Oct 23 02:50:36 2006 +0900 @@ -23,7 +23,7 @@ int seqid; int textsiz; - static final int REP_INSERT_CMD = 6; + public static final int REP_INSERT_CMD = 6; static final int REP_INSERT_ACK_CMD = 7; static final int REP_JOIN_CMD = 41; static final int REP_JOIN_ACK_CMD = 42;
--- a/src/remoteeditor/network/RSocketEvent.java Mon Oct 23 02:26:26 2006 +0900 +++ b/src/remoteeditor/network/RSocketEvent.java Mon Oct 23 02:50:36 2006 +0900 @@ -3,9 +3,13 @@ public class RSocketEvent { private int length; private int lineno; + private int cmd; private String text; + private int seqid; public RSocketEvent(int cmd, int sid, int eid, int seqid, int lineno, int textsiz, String text) { + this.cmd = cmd; + this.seqid = seqid; this.length = textsiz; this.lineno = lineno; this.text = text; @@ -30,6 +34,14 @@ public String getText(){ return text; } + + public int getCmd() { + return cmd; + } + + public int getSeqId() { + return seqid; + } }