This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I've seen a few mesages go past in here where people are asking for some sort of UML plugin for Eclipse. Can anyone explain what that might mean? Essentially, I've always thought of UML as a way of drawing designs to show to people, and I can't see why it might be particularly appropriate to include this in an IDE. Is there a problem with existing drawing programs?
Right, you can draw general UML diagrams with almost any good visual diagram tool. But more specifically, I'd like a well-integrated UML tool in Eclipse that could extract my package heirarchy (or java code) and auto-generate an UML diagram. It would also be really great if I could create a UML diagram and it would auto-generate the necessary code. Or, if I modified an existing UML diagram, it would make the necessary changes to the underlying code.
Frank, I guess we just have to live with the fact that some people want to make UML a programming language... Regarding your question on drawing programs - which one are you using? I am currently using Dia, which is a PITA, but closest to what I really want. [ August 22, 2003: Message edited by: Ilja Preuss ]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Jan 07, 1999
But more specifically, I'd like a well-integrated UML tool in Eclipse that could extract my package heirarchy (or java code) and auto-generate an UML diagram. Hmm. I can see that this might be possible for the simpler UML diagram types, such as a class diagram, to be automatically generated from code. But would this actually be much use if you already have the code? I find it hard to imagine a software process to generate sensible and readable collaboration, use-case or sequence diagrams, though. Any reasonable-sized application has many thousands of method calls, and the whole point of using UML to explain something is to omit most of them to emphasise a particular facet of the design. It would also be really great if I could create a UML diagram and it would auto-generate the necessary code. Or, if I modified an existing UML diagram, it would make the necessary changes to the underlying code. Likewise, I'm sure you could draw a class diagram and have it auto-generate empty class definitions for you. I have trouble seeing the point of this, though - creating and renaming/moving classes is already trivial in Eclipse, and doing it by drawing pictures just seems an overcomplicated and clumsy way of going about it. I've never found enough detail on the UML diagrams I've seen for them to be useful in generating actual code to fill out methods. Maybe you could use a state diagram to configure a state machine, if you have a whole bunch of template code already to hand, but what do you imagine this UML plugin might do with a collaboration or use-case diagram, for example? I'm honestly puzzled by all this. Has anyone ever used any of this kind of "UML tool" ? There seem to be several on the market but I still have trouble understanding how they offer any benefits over the kinds of features offered by a drawing programn (or whiteboard!) and a decent IDE such as Eclipse.
Ok. Here's my take on this. A bit provocative at times but at least we'll keep the discussion going. UML-to-Java code generation seems only useful for a BDUF project where the design hardly ever changes (yeah, right). Once you've generated the code, you've saved in typing. Is typing (class skeletons) really worth the trouble pre-scribing the design fully in UML? Java-to-UML reverse engineering is only useful for producing "forced-upon" documentation and for learning purposes. Forced-upon UML documentation is obviously something that shouldn't happen. Reverse engineering to UML for learning purposes has better alternatives in the form of dependency and method call hierarchy analysis/visualization tools. The problem with reverse engineering is that the tools are too dumb to recognize the tiny part of the whole that the user is really interested in. Reverse engineering a reasonable size project would cause information overflow and probably wouldn't help much. Round-trip engineering (UML-to-Java-to-UML or Java-to-UML-to-Java) has a certain attraction but, again, it provides little value beyond auto-generating nice UML diagrams (especially when compared to the cost of tools that support this, such as Rational XDE).
Eclipse UML has a free version (I have seen it demonstrated but never used it). -- Dan
Co-author of <a href="http://www.jdg2e.com" target="_blank" rel="nofollow">The Java Developer's Guide to Eclipse</a>, 2nd Edition<br />(Yahoo group <a href="http://groups.yahoo.com/group/JDG2E/" target="_blank" rel="nofollow">JDG2E</a>)
Joined: May 20, 2003
Dan, That's the Omondo UML plug-in I tried. However, it currently does not support Eclipse 3.0 or JDK 1.4.
Dastardly Dan the Author
Joined: Jun 11, 2003
Given that the golden 3.0 version of Eclipse isn't scheduled to ship until 2Q2004, it's hard to hold that against them. However it is odd about JDK 1.4. In any case, I regret that I don't know of any free UML tools for the current Eclipse 3.0 builds. FWIW, when I have productive work to do, I stick with the golden version, 2.1.1. I save 3.0 builds for "playing around" since I have tools that I depend upon that do not step up to recent builds (milestones, if that). Attractive as the latest and greatest may be, I don't yet see a must have feature yet. Is there for you? Just curious... -- Dan
Joined: May 20, 2003
No, I mistakenly thought that 3.0 was a stable release, but now I see the release is actually scheduled for next year. I thought that with 3.0, there would be new and more interesting plug-ins, but that's not the case (yet). So I've since reverted back to 2.1.1 and am using www.myeclipseide.com.