Link project classes/interfaces to diagram's ones

+1 vote
asked Jun 24, 2022 in Wanted features by teso (120 points)
Hey, guys.

Thanks for the great tool. Could you help me to find one thing? I want to link my project classes/interfaces to the same entities on my class diagram. When I do Ctrl+Click on the class name in my IDE (PhpStorm), I expect to go to its definition in my code. I am not sure if this has already been done and I missed it in the documentation.

Thanks in advance.

2 Answers

0 votes
answered Sep 26, 2022 by Todd Musheno (2,680 points)
An concrete example may help here...

You want to use PlantUML to generate class diagrams from Java source.

How would one Link JavaDoc -> Diagrams, and Make links Diagram -> JavaDoc pages.
commented Sep 27, 2022 by teso (120 points)
Hey. I see this as the link between the entity on my class diagram and the existing class definition in code. They could have the same name and be connected through some kind of import syntax or be linked in another way (like Poi described below). And when I look at my class User on the class diagram and wanna refresh its definition in my memory - it's enough to do Ctrl+<Left mouse click> (it's a short key in PhpStorm for opening class definition from its usage) on the class name to go to the code of class User
commented Sep 28, 2022 by Todd Musheno (2,680 points)
More detail please, I do not understand your point.
0 votes
answered Sep 27, 2022 by poi (1,200 points)
edited Sep 27, 2022 by poi

This is a hint rather than an answer. You write

Ctrl+Click on the class name [in the class diagram] in my IDE (PhpStorm), I expect to go to its definition in my code.

I do this with svg-files in a special web-browser of the MATLAB IDE. This statement in the puml-script defines the hyperlink.

 class SuperClass <<(H,#E6FFE6)>> [[matlab:matlab.desktop.editor.openAndGoToLine('D:\m\m2uml_sandbox\tests\m4test\+F2\SuperClass.m',1);{No tooltip}]] {

"matlab:matlab.desktop.editor.openAndGoToLine" is MATLAB specific. I'm not familiar with PhpStorm.

See https://plantuml.com/link and https://plugins.jetbrains.com/plugin/14821-plantuml-studio and https://www.jetbrains.com/phpstorm/?q=plantuml&s=full

...