1

I am using the PlantUML Integration plug-in to create a class diagram following the documentation: enter link description here

Would it be possible to link the actual class or the method line to the class diagram?

Xin Zhang
  • 103
  • 1
  • 9
  • "Would it be possible to link the actual class or the method line to the class diagram?" I don't understand the question. What language are you using? Do you want to link source code with a diagram? – Fuhrmanator Oct 21 '22 at 21:38
  • @Fuhrmanator yes, would it be possible to link sourcecode to the diagram or the puml file? the source code is in Java. – Xin Zhang Oct 21 '22 at 21:44
  • UML is language agnostic. So how could that ever be possible? Besides, a class diagram does not show behavior and code IS behavior. Double no sense in your question. – qwerty_so Oct 21 '22 at 23:11
  • @qwerty_so It's possible to create a class diagram from code; several tools do this including IntelliJ. Each class (Java) is a UML class, each method (Java) shows up in its corresponding UML class. You can even make association links from instance variables, etc. – Fuhrmanator Oct 22 '22 at 05:45
  • @Fuhrmanator These translators look only at the "language agnostic" parts which can map to UML. These are usually the so-called header files where class declarations are held. "Code in the sense of ocde" is what coders are paid for. Namely behavior. – qwerty_so Oct 22 '22 at 09:38

1 Answers1

1

from the plugin's help text accessible from the jetbrains UI question mark icon:

Diagram [[file links]]:

  • supported paths: relative to the source code file, relative to module > content roots, absolute
  • methods, fields, variables and other identifiers can be referenced by > suffix, e.g. file.java#methodName
  • paths with spaces are not supported

But I haven't got it working for me

Yehuda Makarov
  • 576
  • 6
  • 14