Mar 262012
 

With each new version of the NetBeans Platform, there are useful new features that developers can use in their platform applications. And 7.2 is no exception to this rule. 🙂

There are a number of new features already available in the development builds for 7.2, in the Window System amongst others. The one feature that has been drawing some attention is the fact that a TopComponent can now have an animated icon indicating to the user that it is busy with some process. What the NewAndNoteworthyNB72 page does not say is how this can be used. In your TopComponent, simply call

makeBusy(true);

to activate the icon. Have a look at the javadoc for more info.

Mar 232012
 

One of the fun things about using the latest development builds of the NetBeans IDE is discovering the small new features that make life easier. And of course letting everybody else know about them. 🙂

So today I was playing around with the latest development build for 7.2 (build 201203180400) and I found something small but noteworthy. When working with any Java project, you are dealing with source packages in the Projects view. And there are different options for how they are displayed.

This feature was discussed in a very interesting thread on the mailing list back in NetCAT 7.1. If you are interested in reading the discussion (which includes the merits and problems associated with each option), it starts here.

In NetBeans 7.1, there were two options: List view and Tree view. These are accessible by right-clicking on a space in the Projects window and choosing View Java Packages as… from the context menu.

The default view is List. Lets look at what a Java application with a number of source packages looks like in this view.

List View

List View

Only source packages that contain source files are shown.

The other view that has been around for a while is the Tree view. Lets look at the same project, in tree view:

Tree View

Tree View

While this view may be more compact for really big projects, for smaller ones it adds a lot of effort in my opinion when you just want to switch between your packages. And that was my argument for not having the tree view as the default option.

Now if you read the whole mailing list thread, you would have noticed that there was a new option that was proposed: Reduced Tree. And that is now available in the NetBeans 7.2 development builds! 🙂 So lets have a look at the same project again, in the new view:

Reduced Tree View

Reduced Tree View

This is a brillaint compromise between the two views! Packages with no source files are shown a like they would have been in the list view. And the rest like the tree view. It gives you a quick to navigate view for smaller projects and still keeps the list compact for large projects. Thank you to the NetBeans team for yet another very useful improvement!

Mar 202012
 

There is one bug in the NetBeans IDE that has been my nemesis ever since upgrading to Windows Vista 64-bit back in the day: #177820. In short, this bug means that no output is shown when an application is executed with a 64-bit JVM. There is luckily a work-around – setting up the IDE to use a 32-bit JVM even if you are running a 64-bit operating system.

The great news is that this issue has been fixed in the NetBeans 7.2 development builds (since 17 March 2012) for Ant-based projects! A big thanks to Jiri Rechtacek for this fix! 😀

Edit: In my excitement about this fix I forgot to mention that this is specifically for NetBeans Platform applications. 🙂

Mar 132012
 

Originally all NetBeans Platform applications were built using the Ant-based build harness. And of course this option is still available in NetBeans 7.1. However, the IDE also has tool support for creating platform applications built with Maven, which was added in more recent versions.

I have been working with the NetBeans Platform since 5.5 days, and I have learned a good deal about the Ant build harness over the years. Last week I started a new job and now I am wrapping my mind around building a platform application using Maven. This is the first of an (as yet) unknown number of articles documenting the lessons that I am learning in this process about the differences between the two approaches. It is my hope that the information will make the mind shift from Ant to Maven easier for other developers. 🙂

One of the first questions that came to mind after I created my first Maven-based platform application, is “where did the Package As… menu go?” The context menu of an Ant-based suite used to contain a lot of separate packaging actions back in the day. More recently, all these actions (including the one that builds a zip file) were moved to the Package As… menu. But for my Maven project, no such menu was anywhere to be found!

After a brief moment of frustration, I decided to have a look at the folder structure of the project once it was built. And there I found a zip distro that looks identical to the one I would have expected from an Ant-based project. As it turns out, this always gets built when you build the application, and is stored in the application/target folder.

Another useful thing in the same location is the userdir folder – this is the equivalent of the build/testuserdir folder for an Ant-based application.

Read the Maven Best Practices wiki page for some more interesting information.

Mar 102012
 

The NetBeans Community Acceptance Testing program (NetCAT) for NetBeans 7.2 kicked off today! This is an opportunity for community members to help make the NetBeans IDE even better, while meeting interesting people from around the world and learning a bit about how the NetBeans development and QA teams work. If you are interested in joining this dynamic group of volunteers, have a look at the NetCAT wiki page for more information.

Hope to see YOU there! 🙂

Mar 052012
 

Building an Ant-based NetBeans Platform application from the command line on a build server is a typically a little different from building it on developer PC. In an earlier post I explored which ant targets are useful when building your application from the command line. In this post I explore what is different on a build server.

The nbproject/private folder in suite and module projects contain files that are specific to a particular developer’s PC. As such, this folder should typically not be checked into a source repository. And hence when a build server checks out the source code, that folder will not exist either.

That may seem unimportant. However, one of the properties that is specified in this way is the platform folder location. Without this property, the ant scripts will not know where to find the platform or even the build harness itself. There is luckily an easy way to specify these properties by adding some command line parameters to the ant call to build the suite:

[text]ant -Dnbplatform.default.netbeans.dest.dir=”C:Program FilesNetBeans 7.1″
-Dnbplatform.default.harness.dir=”C:Program FilesNetBeans 7.1harness”
-f build.xml build[/text]

Note that this is all one command – the multiple lines above are just for the sake of readability.

Read my series of articles On the NetBeans Platform Build System for more information regarding the build harness.