For an open source UML tool, I recommend that you acquiant yourself with
ArgoUML. It's in Java, and requires Swing. A cool piece of work.
There's more to UML than emitting code skeletons. I often use Visio when designing, mostly to draw Event Trace diagrams to describe protocols and walk through object interactions. Event traces are largely independent of implementation language. They work just as well with Perl as they do with Java (or whatever).
The last experience I had generating code skeletons from diagrams wasn't particularly successful. We ended up extracting attributes from the diagrams, and automating the generation of (skeletal) class definitions and accessors. Strictly one-way, and, in hindsite, barely worth the effort.