processing template in eclipse

I don’t know why I never got processing running in eclipse sooner, all it took was 15 minutes! I’ve always used the Eclipse IDE for Flash but it is truly another leap of what it can do for processing.

The great thing about the Eclipse IDE in regards to Java (which is what the processing library is built on), is that it does all error checking as you write your code. So you don’t waste any time publishing your code and watch it come up with syntax errors. Its very easy to keep track of your libraries, and you get the extra benefit of using specialised Java libraries, such as JOGL (Java OPEN-GL) which can increase the performance of your processing sketches and add that little bit of eye candy.

No point in reinventing the wheel so here is link to a tutorial on how to run processing in eclipse.

To make processing life even easier, you can create templates for your processing code. Saves you typing the same setup() and draw() method every time and you can structure your code in a systematic way. Here is a processing template I’ve created.

Open the file, copy what is inside, then in eclipse, goto Window->Preferences. Click the Java tab, then Editor tab, then Templates. Here are your templates, get acquainted with them as they can save you a heap of time. To create your processing template, click New and in the new window, where it say Name, type in “processing”. Below, where it says pattern, copy the content of the processing template you just downloaded. Press OK and your done.

So lets test it. You will have to create a new project and in that project create your processing class. Right click the project, goto New and click Class. Give it a name and press Finish. Eclipse will give you a standard Java template. Delete all the code you see inside, type “processing” and press CTRL+SPACE. Your template should pop up now, all nicely structured and ready to go.

This is just one of many features that eclipse offers to make developing easier. I’m finding new shortcuts everyday. Enjoy.


About this entry