One of the things I’ve been most excited about with NetBeans, is the prospect of hooking it into Trac using Cube°n. Now, I should note that I didn’t even think about doing this till I ran across Mylar for Eclipse. So, I went ahead and downloaded Cube°n, and installed it using the NetBeans plugins workflow:
Simply download and unpack the ZIP file (2.7MB) and then in NetBeans, choose Tools » Plugins, click the Downloads tab, and then Add Plugins…
In the file picker, just select all, and click Open. Next, click Install
In a world where everything “Just Works”, that would be it. But unfortunately, on OSX, it’s sometimes not. While the plugin appears to function fine, when you to make it grab tickets, you will get a wonderful uncaught exception dialog.
By default, OS X Leopard does not have the Java 6 (1.6) environment, so check if you have it. You can do so by looking to see if you have /System/Library/Frameworks/JavaVM.framework/Versions/1.6, if not you will need to grab Apples Java for Mac OS X Update 1 (57MB), Update 2 (136.4MB) and Update 3 (3MB)
Finally, even if you have Java 1.6, you will probably need to modify your NetBeans config to use it. This can be found in /Applications/NetBeans/NetBeans$ver.app/Contents/Resources/NetBeans/etc/netbeans.conf.
Open up this file, and look for:
And change it to:
Once this is done, just re-start NetBeans.
Next, go to Window » Cube°n » Task Repositories, and a new pane will appear in the bottom left under your Project/Files/Services pane. Right click in the new pane and choose New Task Repository; choose Trac Repository and give it an Alias (a name), and the rest of the information it needs.
Choose Validate Connection and then Finish. If you encounter an SSL error, see the Cube°n FAQ.
Finally, you can add queries to grab whatever collection of tickets you would like. You use the TracLinks query syntax which means you can create complex filters.
I have a filter for My Active Tickets, “owner=USERNAME&status!=closed|testing” and one for each milestone so I can see and accept tickets that are not mine, “milestone~=iris&owner!=USERNAME&status!=closed|testing”
Working with Tasks
One of the biggest benefits of working with Cube°n [and Mylar] is the ability to associate a context with them; that is your open files, and other related tickets. To do this, simply click the Activate button. Once this is done, any currently open files are automatically associated with the ticket… or at least they would be if you were using Java. *sigh*
Still, it’s a start. Hopefully the guys at Cube°n will fix this oversight soon enough, and us lowly PHP developers will get in on the fun.
They are already working on some neat features, such as allowing you to commit to RCS using the task context (i.e. close a task, and commit all associated files), as well as associating debugger breakpoints and watches with the task; allowing you to make those task specific, even when two separate issues touch the same files. Both of these features would be great, making sure you don’t forget to commit a related file, and imagine being able to go back to a task 6 months later because a related issue has come up and having all your original files and debugging settings immediately available.