1 ! Copyright (C) 2004, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators.short-circuit editors io.pathnames
4 io.standard-paths kernel make math.parser namespaces sequences
9 jedit editor-class set-global
11 ERROR: jedit-not-found ;
13 HOOK: find-jedit-path os ( -- path )
15 M: object find-jedit-path f ;
17 M: macosx find-jedit-path
18 "org.gjt.sp.jedit" find-native-bundle [
19 "Contents/MacOS/jedit" append-path
24 M: windows find-jedit-path
25 { "jedit" } "jedit.exe" find-in-applications ;
27 : jedit-path ( -- path )
29 find-jedit-path [ "jedit" ?find-in-path ] unless*
32 M: jedit editor-command ( file line -- command/f )
36 [ , ] [ number>string "+line:" prepend , ] bi*