Mercurial > hg > RemoteEditor > Eclipse
changeset 24:e9b015eb1e05
*** empty log message ***
author | pin |
---|---|
date | Tue, 14 Nov 2006 14:31:59 +0900 |
parents | 24f5a9614d78 |
children | 32b28608baa6 |
files | bin/remoteeditor/editors/RemoteEditor.class bin/remoteeditor/network/REP.class src/remoteeditor/editors/RemoteEditor.java src/remoteeditor/network/REP.java src/sample/merge/Translate.java |
diffstat | 5 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/remoteeditor/editors/RemoteEditor.java Tue Nov 14 14:31:59 2006 +0900 +++ b/src/remoteeditor/editors/RemoteEditor.java Tue Nov 14 14:31:59 2006 +0900 @@ -78,9 +78,9 @@ } void replaceInsertDelete(int kindOfCmd, int lineNo, int LineLength, String text) throws Exception{ - final int offset = document.getLineOffset(lineNo-1); + final int offset = document.getLineOffset(lineNo); final String changedText = text; - final int replaceLength = document.getLineLength(lineNo-1); + final int replaceLength = document.getLineLength(lineNo); viewer.getTextWidget().getDisplay().syncExec(new Runnable() { public void run() {
--- a/src/remoteeditor/network/REP.java Tue Nov 14 14:31:59 2006 +0900 +++ b/src/remoteeditor/network/REP.java Tue Nov 14 14:31:59 2006 +0900 @@ -117,7 +117,7 @@ System.out.println("read packet:" + cmd +", "+ sid +", "+ eid +", "+ seqid +", "+ lineno +", "+ textsiz +", "+ string); } - public void insert(int offset, int length, String text) { +/* public void insert(int offset, int length, String text) { cmd = REP_INSERT_CMD; seqid = (byte)offset; try { @@ -155,7 +155,7 @@ } catch (Exception e) { e.printStackTrace(); } - } + }*/ public ByteBuffer pack(int cmd, int sid, int eid, int seqid, int lineno, String text ) { @@ -165,7 +165,7 @@ buffer.putInt(seqid); buffer.putInt(lineno); buffer.putInt(text.length()*2); //buffer.putString(text); - System.out.println("pack:" + cmd +", "+ "length="+ text.length() +" "+ sid +", "+ eid +", "+ seqid +", "+ lineno); + //System.out.println("pack:" + cmd +", "+ "length="+ text.length() +" "+ sid +", "+ eid +", "+ seqid +", "+ lineno); for(int i=0;i<text.length();i++) { buffer.putChar(text.charAt(i));