(Mirror 1)       (Mirror 2)       (Mirror 3)      


#NotInMyName

Incubation

This page lists some features that have not been officially integrated into PlantUML.

Those features are working, but subject to changes. So you should NOT use them in real diagrams.

They are here so that users can make suggestions on the Q&A board or by mail before official release.

Return in Sequence Diagram

A new command return for generating a return message with optional text label. The point returned to is the point that cause the most recently activated life-line. The syntax is simply return label where label, if provided, can be any string acceptable on conventional messages.
@startuml
Bob -> Alice : hello
activate Alice
Alice -> Alice : some action
return bye
@enduml

This feature will be soon officially released, and you may contribute on the forum if you agree/disagree with this idea..

Shortcut syntax for activation, deactivation, creation

Immediately after specifying the target participant, the following syntax can be used:
++Activate the target (optionally a #color may follow this)
--Deactivate the source
**Create an instance of the target
!!Destroy an instance of the target
@startuml
alice -> bob ++ : hello
bob -> bob ++ : self call
bob -> bib ++  #005500 : hello
bob -> geoge ** : create
return done
return rc
bob -> geoge !! : delete
return success
@enduml

This feature will be soon officially released, and you may contribute on the forum if you agree/disagree with this idea..

Autoactivation in Sequence Diagram

@startuml
autoactivate on
Bob -> Alice : hello
Bob <-- Alice : ok2
@enduml

This works with the return keywords:

@startuml
autoactivate on
alice -> bob : hello
bob -> bob : self call
bill -> bob #005500 : hello from thread 2
bob -> geoge ** : create
return done in thread 2
return rc
bob -> geoge !! : delete
return success
@enduml

Change layout engine

@startuml
' Avaible: dot, neato, fdp, twopi, circo;
' See GraphViz documentation
skinparam layout circo
class A
class B
class C
A -- B
@enduml

Change line type

@startuml
skinparam linetype ortho
[*] --> Idle
Idle --> Configuring : EvConfig
Configuring --> Idle : EvConfig
@enduml

Change line color in state diagrams

@startuml
State S1
State S2
S1 -[#DD00AA]-> S2
S1 -left[#yellow]-> S3
S1 -up[#red,dashed]-> S4
S1 -right[dotted,#blue]-> S5

X1 -[dashed]-> X2
Z1 -[dotted]-> Z2
Y1 -[#blue,bold]-> Y2
@enduml

Reference in sequence diagrams

@startuml
Dummy -> Alice : foo1
ref over Alice, Dummy : [[http://www.google.com]] Foo2

Alice -> Bob : hello

ref over Alice, Bob
  [[http://www.google.com]]
  this is a
  reference over
  Alice and Bob
end

@enduml

URL in diagrams

You can use the url of XXX is [[xxx]] syntax.
@startuml
Bob -> Alice : ok
url of Bob is [[http://www.google.com]]
@enduml
@startuml
skinparam topurl http://www.google.com
Dog --|> Mammal
url of Mammal is [[/search]]
url of Dog is [[http://www.yahoo.com{This is Dog}]]
Dog o-- Cat
Cat --|> Mammal
@enduml
@startuml
actor Mamal
usecase Dog
url of Mamal is [[http://www.google.com]]
url of Dog is [[http://www.yahoo.com{This is Dog}]]
@enduml

It is also possible to specify a link at the beginning of a note (the link applies to the full note), or inside a note (for a portion of the note).

@startuml
:Foo:
note left of Foo {
[[http://www.google.com]]
This is a note
}

note right of Foo {
Yet another link to [[http://www.google.com]] as demo.
You can also [[http://www.yahoo.fr specify a text]] for the link.
And even [[http://www.yahoo.fr{This is a tooltip} add a tooltip]] to the link.
}

@enduml

For classes, you can specify link for fields or methods:

@startuml
Object <|-- Foo
class Foo {
  [[http://www.google.com]]
  + methods1() [[http://www.yahoo.com/A1{Some explainations about this method}]]
  + methods2() [[http://www.yahoo.com/A2]]
}
  
class Foo2 {
  + methods1() [[http://www.yahoo.com/B1]]
  + methods2() [[http://www.yahoo.com/B2]]
}
  
class Object {
  [[http://www.yahoo.com]]
}
@enduml

Extends/Implements

@startuml
Object ^-- AbstractList

class ArrayList extends Object {
  int size
}

interface List extends Collection {
  add()
}

interface Set extends Collection

class TreeSet implements SortedSet
@enduml

Associations

@startuml
class Station {
    +name: string
}

class StationCrossing {
    +cost: TimeInterval
}

<> diamond

StationCrossing . diamond
diamond - "from 0..*" Station
diamond - "to 0..*" Station
@enduml

Note on link

@startuml
(*) -> "foo"
note on link: this is a note
@enduml
@startuml
class Foo1
class Foo2
Foo1 --> Foo2 : Some information
note on link
	You can put note
	On several lines
end note

Foo2 --> Foo3 : Another text
note right on link : here a note on 1 line
@enduml

Note design

@startuml
caller -> server : conReq
hnote over caller : idle
caller <- server : conConf
hnote over caller : connected
note over server : connected
rnote over server
 this is
 on several
 lines
endrnote
hnote over caller
 this is
 on several
 lines
endhnote

@enduml

Support This Project Offer 250 Mo! Java profiler Follow PlantUML on Twitter