/ Published in: XML
This allow running groovy inside jEdit
Copy it to $HOME/.jedit/console/commando
Copy it to $HOME/.jedit/console/commando
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0"?> <!DOCTYPE COMMANDO SYSTEM "commando.dtd"> <!-- Quick Groovy Commando Command --> <COMMANDO> <UI> <CAPTION LABEL="Source File(s)"> <FILE_ENTRY LABEL="File Name" VARNAME="file" EVAL="buffer.getPath()"/> </CAPTION> <CAPTION LABEL="Interpreter Options"> <CHOICE LABEL="Action" VARNAME="action" DEFAULT="run"> <OPTION LABEL="Run" VALUE="run"/> </CHOICE> <CHOICE LABEL="Safety" VARNAME="safety" DEFAULT="0"> <OPTION LABEL="Unsafe" VALUE="0"/> <OPTION LABEL="Low" VALUE="1"/> <OPTION LABEL="Medium" VALUE="2"/> <OPTION LABEL="High" VALUE="3"/> <OPTION LABEL="Sandbox" VALUE="4"/> </CHOICE> <CHOICE LABEL="Warnings" VARNAME="warning" DEFAULT="2"> <OPTION LABEL="No Warnings" VALUE="0"/> <OPTION LABEL="Simple Warnings" VALUE="1"/> <OPTION LABEL="Full Warnings" VALUE="2"/> </CHOICE> <ENTRY LABEL="Source File Encoding" VARNAME="encoding" EVAL="buffer.getProperty(Buffer.ENCODING)"/> <TOGGLE LABEL="Switches are global variables" VARNAME="transform" DEFAULT="FALSE"/> <TOGGLE LABEL="Verbose output" VARNAME="verbose" DEFAULT="FALSE"/> <TOGGLE LABEL="Embedded Groovy script" VARNAME="embedded" DEFAULT="FALSE"/> <ENTRY LABEL="Other Options" VARNAME="other"/> </CAPTION> <CAPTION LABEL="Script Options"> <ENTRY LABEL="Script Command-Line Arguments" VARNAME="arguments"/> </CAPTION> </UI> <COMMANDS> <COMMAND SHELL="System" CONFIRM="FALSE"> buf = new StringBuffer(); buf.append("/opt/groovy-1.0/bin/groovy"); buf.append(" \""+file+"\""); if(!arguments.equals("")) buf.append(" "+arguments); // return value buf.toString(); </COMMAND> </COMMANDS> </COMMANDO>