Skip to content

Instantly share code, notes, and snippets.

@monkstone
Created June 12, 2013 05:41
Show Gist options
  • Save monkstone/5763052 to your computer and use it in GitHub Desktop.
Save monkstone/5763052 to your computer and use it in GitHub Desktop.
Commando file and macro to launch processing.py form JEdit since version 0021
<?xml version="1.0" ?>
<!-- Commando file for processing.py Since version 0021 by Martin Prout 12-Jun-2013
Put this file in the .jedit/console/commando folder (when 1st run enter path to processing.py)
-->
<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
<COMMANDO>
<UI>
<CAPTION LABEL="Run Processing.py">
<FILE_ENTRY LABEL="sketch" VARNAME="sketch" EVAL="buffer.getPath()"/>
<FILE_ENTRY LABEL="Path to processing-py.sh" VARNAME="processingpy" DEFAULT=""/>
</CAPTION>
</UI>
<COMMANDS>
<COMMAND SHELL="System" CONFIRM="FALSE">
<!-- cd to working dir -->
buf = new StringBuilder("cd ");
buf.append(MiscUtilities.getParentOfPath(buffer.getPath()));
buf.toString();
</COMMAND>
<COMMAND SHELL="System" CONFIRM="FALSE">
buf = new StringBuilder(100);
buf.append(processingpy);
buf.append("processing-py.sh ");
buf.append(sketch.replace(" ", "\\ "));
buf.toString();
</COMMAND>
</COMMANDS>
</COMMANDO>
// macro for processingpy commando file, save this buffer
// in the .jedit/macros folder, and the macro should appear in the
// Macros menu.
new console.commando.CommandoDialog(view,"commando.processingpy");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment