Support for the different @start... commands

0 votes
asked Apr 2 in Question / help by albert (3,000 points)

In the plantuml source code (src/net/sourceforge/plantuml/core/DiagramType.java) I found a number of possible start commands:

startwire
startbpm
startuml
startdot
startditaa
startsalt
startmath
startlatex
startgantt
startmindmap
startwbs
startyaml
startcreole
startjson
startflow

startcute
startproject
starttree
startboard
startgit
startjcckit
startnwdiag

startdef

For the first set (startwire ...startflow) I found one or more examples and could run these successfully with plantuml (version: 1.2021.4beta4).

For the other commands I could not find a direct example.

For the starttree command I saw an example by means of startuml + salt like:

@startuml
salt
{
{T
- World
}
}
@enduml

though no direct example using @starttree.

Similar for nwdiag with

@startuml

nwdiag {

...

Even worse when trying some of the @start... plantuml crashed with a java.lang.IllegalStateException

Where can I find some examples for the "non-working" @start... commands?

1 Answer

+1 vote
answered 5 days ago by The-Lu (19,740 points)
selected 4 days ago by albert
 
Best answer

Hello A.,

Here are some elements:

  • For startcute & starttree

From src/net/sourceforge/plantuml/core/DiagramType.java
- startcute is for CUTE diagram
- starttree is for JUNGLE diagram
Unfortunately there are not include, see line 212-213 of src/net/sourceforge/plantuml/PSystemBuilder.java

// factories.add(new PSystemTreeFactory(DiagramType.JUNGLE));
// factories.add(new PSystemCuteFactory(DiagramType.CUTE));

  • For startboard

See Issues#423

  • For startgit

See PR#493

Then perhaps you can share all your minimal examples?

If that can help,
Regards,
Th.

commented 4 days ago by albert (3,000 points)

Thanks for the 2 example, I've implemented them in the proposed pull request for doxygen (https://github.com/doxygen/doxygen/pull/8478).

I have some examples, but they are just for doing some small tests whether or not a picture is generated. But anyway:


@startbpm
:login;
20:<+>
:show new message1;
30:<+>
resume 20
:show new task2;
@endbpm


@startcreole
Alice -> Bob : hello --there-- here
... Some ~~long delay~~ ...
Bob -> Alice : ok
note left
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is --stricken-out--
  This is __underlined__
  This is ~~wave-underlined~~
end note
@endcreole


@startditaa
+--------+   +-------+    +-------+
|        +---+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+
@endditaa


@startdot
digraph foo {
  node [style=rounded]
  node1 [shape=box]
  node2 [fillcolor=yellow, style="rounded,filled", shape=diamond]
  node3 [shape=record, label="{ a | b | c }"]

  node1 -> node2 -> node3
}
@enddot


@startflow
foo "flow"
bar "bar"
baz "baz"
@endflow


@startgantt
Project starts 2021-03-17

saturday are closed
sunday are closed

' Milestones
[Review 01] happens at 2021-03-29
[Review 02] happens on 21 days after [Review 01]'s end
[Review 02] happens on 3 weeks after [Review 01]'s end
@endgantt


@startjson
{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 27,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}
@endjson


@startlatex
\sum_{i=0}^{n-1} (a_i + b_i^2)
@endlatex


@startmath
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)
@endmath


@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


@startsalt
{
  Just plain text
  [This is my button]
  ()  Unchecked radio
  (X) Checked radio
  []  Unchecked box
  [X] Checked box
  "Enter text here   "
  ^This is a droplist^
}
@endsalt


@startuml
Alice -> Bob
@enduml


@startwbs
+ World
++_ America
++_ Europe
@endwbs


@startwire
* first
* second_box [100x50]
* third
@endwire


@startyaml
fruit: Apple
size: Large
color: Red
@endyaml


@startboard
A1
+U1.1
++S1 R1
++S1 R2
+U1.2
A2
@endboard


@startgit
* a0f65180 (origin/cds/issue700) Layered: Clarified code. #700
* 23a9f435 Layered: Fix wrong hierarchy handling. #700
| * 9037d534 (HEAD -> master, origin/master) Build: Properly sign Maven artifacts. #722
|/  
* 91fc1c7b Build: Mount Jenkins home. #722
* 4fe6df1e Build: Add HOME env var to maven container. #722
@endgit
...