Tim Boudreau

Software Consulting

Meet Tim

Tim Boudreau Tim Boudreau is a noted technology consultant, evangelist and author.

While perhaps most broadly known for his leadership on Sun Microsystems’ NetBeans, those who’ve worked with Tim remark most on his technical chops, passion for a great challenge and rare gift of great communication. And, as a former troubadour, he’s pretty tough when it comes to bad 70s rock lyrics too. A real renaissance programmer.

Recent Blogs RSS Feed

Making async I/O with Netty easy Tue., April 24, 2012 — 01:49am
Unchecked checked exceptions Sat., March 31, 2012 — 01:41am
Fun with Netty and Async IO Mon., February 13, 2012 — 02:17am
Revisiting Imagine - the extensible Java image editor Sat., September 17, 2011 — 08:01am
Thank You So Much for the Third Eye! Thu., July 28, 2011 — 05:39pm

Twitter

  • (Twitter feed loading)

Music

NetBeans Tools for Node.js

Thursday, June 02, 2011 07:46am

Over the last week I wrote a NetBeans plugin for node.js - sources are in NetBeans' contrib repository.

What it gives you:

  • A Node project type

  • Clickable stack traces in the output window

  • A run with node action on Javascript files (and of course, the project)

  • Integration with Node Package Manager (npm) and a slick little UI for adding libraries

  • GUI for editing package.json files, and generating their standard contents

  • Ability to store machine-specific command-line arguments (excluded from version control if you use NetBeans' version control).

  • Ability to download Node's sources so the highlighted stack traces point somewhere

A Node Project in NetBeans
A Node Project in NetBeans

The project metadata is simply the standard package.json metadata which is part of any Node module, so there are (almost) no additional NetBeans-specific files added to a project - and any library you get with npm will also be openable as a project.

The Libraries Customizer
The libraries customizer

The one exception to the no-funky-metadata-files rule is that you can provide command-line arguments to the project. Since these are most-likely machine-specific, they are stored in an .nbrun file which NetBeans knows not to put under version-control.


Library Info - really just JSON-meets-Swing

Basically, I wanted to learn Node.js, and having some decent tools to work with it reduces the headaches - NetBeans already has excellent Javascript editor support thanks to Tor Norbye's amazing work. If you're reading this blog, the server software was written using this plugin - so I'm eating my own dogfood.

The one thing I'd like to get working is code-completion - this may require some hacking of the source indexer - I've been in touch with Tor to try to figure out where to dig to do that, but it may not be a trivial task.

The Node Options Panel
The libraries customizer

How to get it

  • You need a NetBeans Daily Build - from today (June 2, 2011) or later - I had to add some features to some of my other modules, so it will not work with 7.0
  • In Tools | Plugins, it will be in the Available Plugins tab

Prerequisites

  • Install Node - there are distros for most Unix-based OS's
  • Install NPM - ditto

You can do without NPM at the start, but it's worth having - it's the world's simplest package manager, and tons of people publish libraries into it - so it's a great source of both useful things and good code examples.

Other Node Plugins

Before anyone asks, I'm aware that Syntea has a plugin that does the first two things on the feature list above. Since it's a Czech company and a NetBeans plugin, I'm guessing it's probably one of my former colleagues in Prague.

I did attempt - by twitter and email - to contact them to see if I could contribute to their plugin, but got no response.