I just noticed that Intellij has a UML diagram drawer. I am attempting to use it to figure out what is going on in some code that is new to me.
Is there anyway to show the dependencies between all of the classes/interfaces on the screen? Is this a useful feature? It seems to be missing somethings but it might just be that I am not that familiar with UML.
Anyone have any observations?
Is there anyway to show has-a relationships?
You can manually add "has-a" relationships by right clicking on a class in the UML diagram, select "Show classes from signature" (or press Ctrl+Alt+U) and choose the class you want to add. Then you can select "Show dependencies" to let Intellij fill in the dependencies.
Tiny fabricated example (omitted the obvious empty definitions of A, B and I)
class Test implements I {
List<A> a;
B b;
Test(A a, B b) {
this.a = Arrays.asList(a);
this.b= b;
}
}
will result in the following diagram after adding A, B and "Show dependencies":
http://i33.tinypic.com/o8cw36.png (was not allowed to post the image as this is my first post :))
I use Code Iris and PlantUML. It is a very useful tools especially PlantUML. Other tools of this type in the IDEA are paid.
Below PlantUML.
I hope it will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With