开发者

Intellij UML Diagrams

开发者 https://www.devze.com 2022-12-17 12:14 出处:网络
I just noticed tha开发者_StackOverflow社区t 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.

I just noticed tha开发者_StackOverflow社区t 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.

Intellij UML Diagrams

Intellij UML Diagrams

Below PlantUML.

Intellij UML Diagrams


I hope it will help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消