Multilingual Wiki Documentation

You are currently using syntax.
In an attempt to improve PlantUML documentation...
Please do not use this website for your own diagrams.
You can click here and use the online server here for your own documentation.

Recent changes    Wiki Toc    View page history    Add new chapter    Reorder page    Raw

Groovy

Since calling Java from Groovy is pretty simple, the only thing to do is to copy PlantUML.jar file to the classpath (for example, ../Groovy/Groovy-1.7.6/lib directory).

The following script print the current PlantUML version, and encode a URL:

println net.sourceforge.plantuml.version.Version.version() println
net.sourceforge.plantuml.code.TranscoderUtil.getDefaultTranscoder().encode("Bob->Alice:hello")

If you want to generate an image from a description:

s = new net.sourceforge.plantuml.SourceStringReader("@startuml\nBob->Alice:hello\n@enduml")
FileOutputStream file = new FileOutputStream("c:/testGroovy2.png")
s.generateImage(file);
file.close()


Please report any bugs to plantuml@gmail.com or here.
This website is still in beta testing.