feat: add src

This commit is contained in:
dancingCycle 2022-11-28 14:17:02 +01:00
parent debae02a41
commit ec7c280177
16 changed files with 176 additions and 0 deletions

36
readme.md Normal file
View File

@ -0,0 +1,36 @@
# usage
* get version
```
java -jar ~/plantuml/bin/plantuml.jar -version
```
* test the installation of plantuml with a sequence diagram
```
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/sequence-diagram/sequence-diagram-hello.txt
```
* test the installation of Graphviz
```
java -jar ~/plantuml/bin/plantuml.jar -testdot
```
* test the installation of plantuml with a class diagram
```
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/class-diagram/class-diagram.txt
```
* other tests
```
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/start-stop.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/end.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-yes-no.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-color.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-equals.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-elseif.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-elseif-vertical.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/condition-switch.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/loop-repeat.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/loop-repeat-break.txt
java -jar ~/plantuml/bin/plantuml.jar -verbose ./src/activity-diagramm/loop-while.txt
```

View File

@ -0,0 +1,6 @@
@startuml
if (color?) is (<color:red>red) then
:print red;
else
:print not red;
@enduml

View File

@ -0,0 +1,17 @@
@startuml
!pragma useVerticalIf on
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
elseif (condition C) then (yes)
:Text 3;
elseif (condition D) then (yes)
:Text 4;
else (nothing)
:Text else;
endif
stop
@enduml

View File

@ -0,0 +1,16 @@
@startuml
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
(no) elseif (condition C) then (yes)
:Text 3;
(no) elseif (condition D) then (yes)
:Text 4;
else (nothing)
:Text else;
endif
stop
@enduml

View File

@ -0,0 +1,6 @@
@startuml
if (counter?) equals (5) then
:print 5;
else
:print not 5;
@enduml

View File

@ -0,0 +1,16 @@
@startuml
start
switch (test?)
case ( condition A )
:Text 1;
case ( condition B )
:Text 2;
case ( condition C )
:Text 3;
case ( condition D )
:Text 4;
case ( condition E )
:Text 5;
endswitch
stop
@enduml

View File

@ -0,0 +1,14 @@
@startuml
start
if (Graphviz installed?) then (yes)
:process all\ndiagrams;
else (no)
:process only
__sequence__ and __activity__ diagrams;
endif
stop
@enduml

View File

@ -0,0 +1,7 @@
@startuml
start
:Hello world;
:This is defined on
several **lines**;
end
@enduml

View File

@ -0,0 +1,15 @@
@startuml
start
repeat
:Test something;
if (Something went wrong?) then (no)
#palegreen:OK;
break
endif
->NOK;
:Alert "Error with long text";
repeat while (Something went wrong with long text?) is (yes) not (no)
->//merged step//;
:Alert "Success";
stop
@enduml

View File

@ -0,0 +1,12 @@
@startuml
start
repeat
:read data;
:generate diagrams;
repeat while (more data?) is (yes)
->no;
stop
@enduml

View File

@ -0,0 +1,12 @@
@startuml
start
while (data available?)
:read data;
:generate diagrams;
endwhile
stop
@enduml

View File

@ -0,0 +1,7 @@
@startuml
start
:Hello world;
:This is defined on
several **lines**;
stop
@enduml

View File

@ -0,0 +1,3 @@
@startuml
A <|-- B
@enduml

View File

@ -0,0 +1,3 @@
@startuml
Alice -> Bob: Hello world!
@enduml

View File

@ -0,0 +1,3 @@
@startuml
Alice -> Bob: test
@enduml

View File

@ -0,0 +1,3 @@
@startuml
testdot
@enduml