Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pharo support for PlantUML

License

NotificationsYou must be signed in to change notification settings

fuhrmanator/PlantUMLPharoGizmo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 

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.

Demo video of prototype

Loading (requires Moose)

Metacellonewrepository:'github://fuhrmanator/PlantUMLPharoGizmo/src';baseline:'PUGizmo';  load.

Loading (without Moose, requires Pharo 9)

Metacellonewrepository:'github://fuhrmanator/PlantUMLPharoGizmo:pharo9/src';baseline:'PUGizmo';  load.

Example

Class diagrams using a Moose Java model

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.

Screenshot of Moose browser

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:

Class diagram

Programmatic usage

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.

Class diagram

Simple class diagram

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.

Class diagram

Mind map

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.

Mind map

About

Pharo support for PlantUML

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp