2

I have already setup PlantUML plugin in PhpStorm.

and I have download Graphviz 2.36 and install in my machine.

I have searched how to setup Graphviz in order to use PlantUML to do a UseCase in PhpStorm, but I can't found any information

wonea
  • 4,783
  • 17
  • 86
  • 139
Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96

2 Answers2

7

It wasn't really clear to me how to install this thing, so here's some instructions with pictures.

First install the plugin:

enter image description here

Set the "Graphviz dot executable":

enter image description here

Optionally associate with .dot files:

enter image description here

You have to wrap your code with @startuml and @enduml for it to do anything, so its not really a dot file, but good enough:

enter image description here

mpen
  • 272,448
  • 266
  • 850
  • 1,236
  • For me it is not so clear whether we must add graphviz dot executable file in PlantUML Settings? Why do we add .dot file extension in file types? In which situation should we create a diagram with dot extension or puml? Could you please extend your answer? – limonik Jun 08 '20 at 13:54
  • @limonik I assume the executable is required and used to do the actual rendering. You *don't* need to add the `.dot` file extension (I said it was optional). Which you use is up to you. I've never used "PlantUML", I just wanted dot support. `.dot` files have better support with other apps, but the `@startuml` kind of invalidates them. – mpen Jun 08 '20 at 19:38
2

I missed setting the "Environment variable".

http://plantuml.sourceforge.net/graphvizdot.html

After setting it, restart your PHPstorm and it should be fine.

authentictech
  • 422
  • 6
  • 23
Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96