NetBeans 7.0 and above UML plugin

If you are using NetBeans 7.0 or above, you probably can’t find your UML plugin any more in the default repository.

From what I can read on the net, the team is working on the plugin rewriting it, and this will take a while.

Semi-broken solution

There is another way to install it, but beware, the plugin will be semi-broken, so jump down to another solution if you like to generate a pretty UML diagram from your code:

  1. by the menu navigate to Tools -> Plugins;
  2. select the “Settings” tab;
  3. click the “Add” button;
  4. as URL copy the following into the textbox:
    http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/catalog.xml

Now on the tab “Available Plugins” there should be UML in category UML.
The problems are:

  • “reverse engineering” command seem to work but you can’t open the files;
  • You can write a class diagram and work on it, but when you open your project next time you will unable to open the diagram again.

So all you can do is work on a temporary diagram, if you need only it.

Another solution

NetBeans UML PlugIn
NetBeans UML PlugIn

You can use yWorks UML Doclet community edition.
This solution will only let you generate a pretty UML diagram from your code.

  1. Download the library from here;
  2. right click on your java project in project explorer within NetBeans;
  3. click on “Properties”;
  4. select  Build => Documenting;
  5. On “Additional Javadoc Options” textbox paste the following (beware, I’m under windows):
    -docletpath “<yworks-uml-doclet-path>\lib\ydoc.jar” -resourcepath “<yworks-uml-doclet-path>\resources” -doclet ydoc.doclets.YStandard -umlautogen

    Where <yworks-uml-doclet-path> is the path of the yworks-uml-doclet folder.
    In my case <yid> is:
    C:\Users\KhawajaAli\Downloads\yworks-uml-doclet-3.0_02-jdk1.5\yworks-uml-doclet-3.0_02-jdk1.5

  6. click “OK“;
  7. right click on your java project in project explorer within NetBeans;
  8. click Generate Javadoc;

Now, within your Javadoc you will have a very nice UML driagram for your classes.

Thanks to Matthew W. Johnson for this solution.

Still unable to create UML design ? Post your issues in the comment section below

Advertisements

Your Thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s