Skip navigation

I was playing around with the Netbeans API, and used it to create a little review comment collector plugin to record review comments in code.

My team (The N1 Service Provisioning System development team – http://www.sun.com/software/products/service_provisioning/index.xml) uses an in house tool developed by one of the team members to do code reviews. This tool is used as a central place to put in all code review comments as the review passes through several phases before check in.

However, the process of entering review comments was getting really out of hand for me. Every review entry would be something like this:

File : xyz.java
Line: 291
Code: public static void main(String args[]) {
Comments:
1. Do this
2. Do that

Lot of work to be done for something so simple. Netbeans to the rescue!

Here’s what I do in Netbeans now (with the help of my plugin):

1. Right click on the line where I want to put a review comment:

2. This throws up a dialog box for entering comments:

3. After entering the comments, I press ‘OK’ and the comments get recorded in the Comment Collector Window (top left) and an annotation appears on the line on which the comment was added:

4. I do this for all the files which I have to review. All the comments have now been collected in the Collector window. I now hit the “Export” button to get the whole list of comments ready to copy and paste into our internal review tool.

Time invested on this plugin : 1 day
Time saved : Much much more than 1 day 🙂

Point : Developing Netbeans Plugins is a piece of cake. Thanks to the efforts of the Netbeans team who have done a fabulous job of documenting things and producing a bunch of 5 star tutorials. Just go to http://platform.netbeans.org/tutorials !

2 Comments

  1. This is excellent. Can you share the sources somehow? I’d like to see how the annotation works, for example. All of the source code would be cool to look at.

  2. Thanks! 🙂
    Talking of code, I will share it for sure in a couple of days. And talking of the details of the annotations, writing a blog post on it right now.
    Rohan


Leave a comment