Bearing in mind the interest shown in UML modeling last week, I went to the above documentation page and picked out this tutorial: UML Modeling: Reverse Engineering Java Applications. When I first landed on that page, it all looked a bit dry. "No screenshots?" I thought. But then I saw the "Show Me" links. They're great—short little demos of the step-by-step instructions found in each section.
So, anyway, I took the Anagram Game from the NetBeans samples and played around a bit, using the new UML modeling features. Pictures speak better than words, so here are a few pictures...
The first picture shows that in the New Project wizard there's now a new category called "UML" (also, if you look at the screenshot, there are other new categories called "Service Oriented Architecture" and "XML", but let's leave those for another day):
In the New Project wizard, I selected "Java-Platform Model by Reverse-Engineering a Java Project".
In the next picture, you see that I've selected the Anagram Game (you must have the application open in the IDE in order to be able to select it, which I think is a bit odd):
Next, the IDE does all the work in the background. You get prompted to approve one or two things, but that's all.
Here you see the colorful result in the Projects window of reverse-engineering an existing project:
The Projects window was never this exciting! You can expand the nodes and inspect what's going on within them:
Next, select all the nodes that you want to diagramize. Here, I was confused initially, because I selected a node and then assumed that all subnodes would automatically be included. This is not the case. You need to explicitly include each subnode that you want to work with in the next steps:
When you select "Create Diagram from Selected Elements", you get a dialog box that lets you choose the type of diagram you want:
Then a diagram is created (in my case, I chose "Class Diagram"), which you can zoom into, as shown below:
You can also create a dependency diagram...
...and, among many other features, you can select to reverse engineer a selected operation in the class diagram (which then produces another diagram, such as a sequence diagram, that shows the control flow, the sequence of behavior, and the concurrent processes and activations):
Soon, I'd like to play with the UML modeling features from the other side—i.e., start without an application and see how far the UML features go in producing an application from a UML model...
For me, though, there's one big problem: There is now so much to get familiar with in NetBeans IDE, it is becoming a serious problem for me! I still haven't done anything with mobility and the Profiler—but now, with all this new functionality (the SOA stuff looks very cool too, for example), I'm going to have to copy and paste myself at least 20 times if I'm going to be able to keep up with everything that NetBeans IDE is able to provide...