15 April 2012

Sketch Outline - Processing Tool

Processing is an open source programming language and environment for people who want to create images, animations, and interactionsInitially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production. It's highly recommended for learning the art of programming.

I've been a long time user of Processing. It's my favorite language when it comes to quick prototyping and testing out new ideas or concepts. The fact that it's Java based, one can use native Java code too. Processing comes with its own basic IDE designed for beginners. The IDE supports plugin like components called Tools which extend its functionality. I had earlier developed a tool for Processing - Color Selector Plus. I've now developed a second tool - Sketch Outline.


Sketch Outline running in Processing 1.5.1 (OS X Lion) and in Processing 2.04 (Windows 7)

Sketch Outline provides a tree view of the member variables, functions and classes within a sketch and allows easy navigation between them. Clicking on any node scrolls and moves the cursor to its definition in the code. This is kinda similar to the Outline View available in Eclipse and many other IDEs. It helps in easy navigation while writing code and very helpful for larger projects.

I've used java parser for generating the AST(Abstract Syntax Tree). An AST is a tree representation of the abstract syntactic structure of source code written in a programming language. Java parser library is simple to use and was a good learning experience for me regarding code parsers. But it has limited functionality, and hasn't been updated to Java 1.6. I'm currently working on a more advanced version of this tool that would use the Eclipse JDT core components. Eclipse JDT core is the back end of the Eclipse Java IDE, responsible for many of the cool features like generating the outline view, background compilation, real time error reporting, code completion suggestions, etc. For now, I plan to use its AST generation feature(it can recover from errors in syntax and still generate the AST!), and batch compilation for reporting syntax as well as compilation errors in real time. 

You can grab the latest version from here. If you're using version 2.0 of Processing or higher, you can also get it from within the IDE by going to Tools menu → Add Tool. Sketch Outline is also listed on Processing's tools page.

The project is open source and hosted on Google Code. Try it out and feel free to give any suggestions or report any bugs in the forum thread, in the issues section of the project or as a comment. 

Cheers!  :)

1 comment:

  1. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!






    iMarque - Form Processing

    ReplyDelete