Fix editors.jedit

db4
Slava Pestov 2008-03-06 16:55:54 -06:00
parent 62568770a9
commit eaf11d94e3
1 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,10 @@
! Copyright (C) 2004, 2007 Slava Pestov.
! Copyright (C) 2004, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays definitions io kernel math
namespaces parser prettyprint sequences strings words
editors io.files io.sockets io.streams.string io.binary
math.parser io.encodings.ascii ;
editors io.files io.sockets io.streams.byte-array io.binary
math.parser io.encodings.ascii io.encodings.binary
io.encodings.utf8 ;
IN: editors.jedit
: jedit-server-info ( -- port auth )
@ -14,17 +15,17 @@ IN: editors.jedit
] with-file-reader ;
: make-jedit-request ( files -- code )
[
utf8 [
"EditServer.handleClient(false,false,false," write
cwd pprint
"," write
"new String[] {" write
[ pprint "," write ] each
"null});\n" write
] with-string-writer ;
] with-byte-writer ;
: send-jedit-request ( request -- )
jedit-server-info swap "localhost" swap <inet> <client> [
jedit-server-info "localhost" rot <inet> binary <client> [
4 >be write
dup length 2 >be write
write