Wednesday, August 19, 2009


Recently, I installed the LightUML plug-in for Eclipse. The installation "process" was easy and straightforward but when I tried to create class diagrams I encountered error dialogs from Eclipse. So, after a little web research, it basically required a couple of "configuration" particulars. Some of my notes are below, but basically I decided to tell LightUML to use the UMLGraph.jar from version 4.8 (instead of the 5.2 that I had installed). As far as I know (when I wrote this), doing so did not "mess up" my UMLGraph 5.2 installation; the configuration change(s) are isolated to the LightUML plug-in.

Here are my notes:
My LightUML Install Notes : This worked for me

Eclipse v3.4.1
GraphViz v
UMLGraph v4.8/v5.2 (see notes below)

=====Eclipse Plugin Settings==============
Preferences > Java > LightUML
* Graph file name: graph
* Output directory (...optional): src/main/lightuml
* Use package or project name as the graph file name: true
* Recurse into subpackages: true
* Javadoc executable path (optional): C:\Program Files\Java\jdk1.5.0_16\bin\javadoc.exe

Preferences > Java > LightUML > Class Diagrams > General
* attributes
* constructors
* operations
* UMLGraph extra command line parameters (optional): -outputencoding UTF-8

Preferences > Java > LightUML > Dot and Pic2plot
* Extra lookup path (optional): C:\develop\tools\graphviz\v2.24\bin
* Graphics format: png

Preferences > Java > LightUML > UML Graph
* UmlGraph.jar path: C:\develop\tools\umlgraph\UMLGraph-4.8\lib\UmlGraph.jar
* sequence.pic path: (empty) [but probably needs to be something if I try to use sequence diagrams]
* UMLGraph version 4.4+

=====Eclipse Plugin modifications============ (path...)/workspace/.metadata/.plugins/org.lightuml.core/ Change 1 : < file: build.xml > Description: For some reason, the ant script thinks that graphviz is failing even though it is just spitting out warnings about fonts. I commented out the <fail> tag in the Ant script and it allowed it to proceed. That is probably a workaround for telling Ant how to properly recognize/ignore the warnings.
<target name="dot-to-graphics">
<!-- load setting for this run (the dot-file-name) -->
<property file="runsettings.ini" />

<property environment="env"/>

<env key="PATH" path="${extra-lookup-path}:${env.PATH}"/>
<arg line="${dot-extra-param}"/>
<arg value="-T${graphics-format}"/>
<arg value="-ograph/${dot-file-name}.${graphics-format}"/>
<arg value="graph/${dot-file-name}.dot"/>
<!-- remove the dot file -->
<delete file="graph/${dot-file-name}.dot" />

<!-- =================================
<fail message="Error executing Graphviz 'dot' ::: ${dot.error}">
<length string="${dot.error}" when="greater" length="0"/>
================================= -->

Change 2: Description: As found on a sourceforge bug report, make all occurrances of 'useexternalfile' look like the following snippet; *At this time, I honestly do not know what this does.