Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and

Thursday, 25 October 2012

Running Vanilla Processing from jEdit

Now that command line has been restored for processing, it is now quite possible to run the sketch that your are currently editing from emacs, vim, jedit and textmate. Here is what I did for jEdit:-

I created a console commando file processing.xml see embedded gist:-

I created a bsh macro script processing.bsh
   1 new console.commando.CommandoDialog(view, null);
   2 runCommandInConsole(view,"System","processing");

I put the console script in my local .jedit commando folder, I put the processing.bsh script in the macro folder. To copy the gist click on the "view raw" link. You obviously require the console plugin to run this script, and I have recently updated the highlight mode for processing at the jEdit community downloads. You may also be interested in similar commando files I created for ruby-processing and also available as a community download.  The presence of the bsh script in the macros folder is detected by jedit and displayed a as clickable button in the drop down macro menu. I used the commando file to cope with the possible options. However since jEdit "remembers" your previously  selected options and automatically detect the pde file, you mostly just click straight through, so single keystroke is probably also possible.
Here is what the gui looks like
Update 20 October 2012 jEdit community is now back on line so you can now download this commando file and my updated processing modes file from there, confusingly they are both called processing.xml, so make sure to keep them separate, I suggest you first download and install the mode, and only once you are happy that the syntax-highlighting is working OK, before you install the commando file. You will need at a minimum the console plugin, but I suggest installing code2html, and editor scheme plugins at a minimum. See below for a screenshot of me "running" a regular pde script from jEdit. Click on image to see larger size. I quite like to have a floating console(takes up less desktop real-estate, however if you prefer you can anchor it to the bottom of the editor, jEdit is extremely customizable.
A regular processing script run directly from jEdit

1 comment:


Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2