- Notifications
You must be signed in to change notification settings - Fork3
fuhrmanator/PlantUMLPharoGizmo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Pharo support for PlantUML.
Note: The GUI part of this project was initially done in Spec 2, which works best in Pharo 8. However, the baseline will load a GUI that works with Pharo 7.
Note 2: Many people have requested support for PlantUMLwithout Moose, so I made a fork. I only tested it in Pharo 9 (PRs are welcome to make it work in Pharo 8):
Note 3: Have a look athttps://github.com/kasperosterbye/PlantUMLBridge for a simpler version of the support in this tool.
Metacellonewrepository:'github://fuhrmanator/PlantUMLPharoGizmo/src';baseline:'PUGizmo'; load.
Metacellonewrepository:'github://fuhrmanator/PlantUMLPharoGizmo:pharo9/src';baseline:'PUGizmo'; load.
One reason to get PlantUML working in Pharo was to use it with Moose, and there is now a Moose browser.Prerequisite: A generated MSE file for the sample projectFactoryVariants was already loaded in Moose.
Here's the SVG of the diagram shown in the screenshot above, rendered from the PlantUML source that you can copy from the browser and render at PlantUML.com:
There's a utility method to generate PlantUML source for a Java model (seethis example) in Moose.
|classespUMLSourcekeyserverUrlimageMorphw |classes:= (MooseModel root first allClassesreject:#isStub)select: [:c | c mooseNamebeginsWith:'headfirst::designpatterns::factory::pizzaaf'].pUMLSource:=PUGizmoplantUMLSourceForMooseClasses: classes.key:= pUMLSource plantDeflateAndEncode.serverUrl:='http://www.plantuml.com/plantuml/png/', key .imageMorph:= (ZnEasygetPng: serverUrl asUrl) asAlphaImageMorph .imageMorphlayout:#scaledAspect.w:= imageMorph openInWindow.w center; fitInWorld.
plantUMLSource:='@startumlskinparam style strictumlskinparam backgroundcolor transparentskinparam classbackgroundcolor Yellow/LightYellowclass Banananote right #red: Ceci n''est pas\nune banane.@enduml'.codePart:= plantUMLSource plantDeflateAndEncode.serverUrl:='https://www.plantuml.com/plantuml/img/', codePart.(ZnEasygetPng: serverUrl) asMorph openInWindow."Get the Source back from a URL"recoveredSource:= serverUrl plantUrlStringToPlantSourceString.selfassert: recoveredSourceequals: plantUMLSource.
plantUMLSource:='@startmindmap* Debian** Ubuntu*** Linux Mint*** Kubuntu*** Lubuntu*** KDE Neon** LMDE** SolydXK** SteamOS** Raspbian with a very long name*** <s>Raspmbc</s> => OSMC*** <s>Raspyfi</s> => Volumio@endmindmap'.codePart:= plantUMLSource plantDeflateAndEncode.serverUrl:='https://www.plantuml.com/plantuml/img/', codePart.(ZnEasygetPng: serverUrl) asMorph openInWindow.
About
Pharo support for PlantUML
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.

