This repository has been archived by the owner on Mar 2, 2018. It is now read-only.
/
reference.jade
357 lines (296 loc) · 11.9 KB
/
reference.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
extends _layouts/default
block title
title JUMLY Reference for directives, CSS classes and or so
block styles
link(rel='stylesheet', href="/reference.css")
block prepend description
- var _ = "JUMLY provides some directives to render sequence diagrams.";
- _ += " This reference says the directives, CSS classes JUMLY generates, ";
- _ += " and most of features of JUMLY.";
- var __description = _;
block navbar
include _includes/navbar
block content
.container
.row
.span3
nav.menu
ul
li: a(href="#_directives") Directives
ul
li: a(href="#_sequence_diagram") Sequence Diagram
ul
li: a(href="#_found") @found
li: a(href="#_message") @message
li: a(href="#_create") @create
li: a(href="#_reply") @reply
li: a(href="#_alt") @alt
li: a(href="#_loop") @loop
li: a(href="#_fragment") @fragment
li: a(href="#_ref") @ref
li: a(href="#_note") @note
li: a(href="#_robustness_diagram") Robustness Diagram
ul
li: a(href="#_actor") @actor
li: a(href="#_view") @view
li: a(href="#_controller") @controller
li: a(href="#_entity") @entity
li TBD
li: a(href="#_css_classes") CSS classes
ul
li: a(href="#_c_diagram") .diagram
li: a(href="#_c_sequence_diagram") .sequence-diagram
li: a(href="#_c_name") .name
li: a(href="#_c_participant") .participant
ul
li: a(href="#_c_found") .found
li: a(href="#_c_interaction") .interaction
ul
li: a(href="#_c_reply") .reply
li: a(href="#_c_activated") .activated
li: a(href="#_c_occurrence") .occurrence
li: a(href="#_c_message") .message
ul
li: a(href="#_c_create") .create
li: a(href="#_c_return") .return
li: a(href="#_c_self") .self
li: a(href="#_c_lifeline") .lifeline
//li
a(href="#_c_line") .line
li: a(href="#_c_fragment") .fragment
ul
li: a(href="#_c_alt") .alt
li: a(href="#_c_ref") .ref
li: a(href="#_c_leftmost") .leftmost
li: a(href="#_c_rightmost") .rightmost
li: a(href="#_reference_by_var") Reference by var
.span7
h1 JUMLY<br>
| Reference Manual
section#_directives
h2 Directives
h3#_sequence_diagram Sequence Diagram
.subsection#_found
h4 @found
p is the top level element to start interactions.
|It puts an
strong
new participant
|with a lifeline which is dashed line
|and a
strong
new occurrence
|which has gray-border rectangle.
:code(type=javascript)
@found "He"
:jumly
@found "He"
p You can put a <code>-></code> to show some interations for the occurrence.
|Make an indent (two spaces are better), and write other directives
|like <code><a href="#_message">@message</a></code>.
:code(type=javascript)
@found "He", ->
@message "calls", "Her"
.subsection#_message
h4 @message
p is an interaction between two participants or self-invoking.
p The following shows an
strong
interaction
|from "He" to "Her" and the name is "calls".
:code(type=javascript)
@found "He", ->
@message "calls", "Her"
:jumly
@found "He", ->
@message "calls", "Her"
p If second argument is not given, it shows self-invoking.
:code(type=javascript)
@found "He", ->
@message "thinks"
:jumly
@found "He", ->
@message "thinks"
p You can put a <code>-></code> in both cases after the last argument for nested interaction.
:code(type=javascript)
@found "He", ->
@message "calls", "Her", ->
@message "tells mail", "He", ->
@message "remembering", ->
@message "mails", "Her"
:jumly
@found "He", ->
@message "calls", "Her", ->
@message "tells mail", "He", ->
@message "remembering", ->
@message "mails", "Her"
@find(".occurrence").addClass "compact"
.subsection#_create
h4 @create
p is a kind of interaction which takes one argument which is a name for new participant.
|The new participant created by <code>@create</code> shifts downward, and the arrow looks
|dashed line.
:code(type=javascript)
@found "He", ->
@create "Contact"
:jumly
@found "He", ->
@create "Contact"
p <code>@create</code> can optionally take <code>-></code>
|at second argument as <code>@message</code> and has some directives.
:code(type=javascript)
@found "She", ->
@create "Dinner", ->
@message "smells", "She"
:jumly
@found "She", ->
@create "Dinner", ->
@message "smells", "She"
@find(".occurrence").addClass "compact"
.subsection#_reply
h4 @reply
p is a directive to show a return-back message.
|This can be put in a <code>@message</code> with an argument for a short description.
|The return-message has a stereotype «return» and the description.
:code(type=javascript)
@found "Browser", ->
@message "GET", "Server", ->
@reply "200"
:jumly
@found "Browser", ->
@message "GET", "Server", ->
@reply "200"
.subsection#_alt
h4 @alt
p is a kind of fragment to make usually two or more conditional
|parts including some interactions. One of part of <code>@alt</code>
|consists of a pair of a text and <code>-></code>.
|You can put several pairs in <code>@alt</code>.
|It has an
strong alt
|tag and each condition's name, and also each part is divided with a dashed line.
:code(type=javascript)
@found "You", ->
@alt
"[have money]": ->
@message "go to", "BookStore"
"[have a card]": ->
@message "go to", "Restaurant"
"[have nothing]": ->
@message "go back", "Home"
:jumly
@found "You", ->
@alt
"[have money]": ->
@message "go to", "BookStore"
"[have a card]": ->
@message "go to", "Restaurant"
"[have nothing]": ->
@message "go back", "Home"
p In each part, nested-interaction is certainly able to be used.
:code(type=javascript)
@found "You", ->
@alt
"[male]": ->
@message "pay with a card", "Bar", ->
@message "auth the card", "Visa"
"[female]": ->
@message "wait for his payment"
:jumly
@found "You", ->
@alt
"[male]": ->
@message "pay with a card", "Bar", ->
@message "auth the card", "Visa"
"[female]": ->
@message "wait for his payment"
.subsection#_loop
h4 @loop
p is a kind of fragment to show repetition.
|A rectangle with fine lightgray line represents a loop.
:code(type=javascript)
@found "You", ->
@loop ->
@message "call", "Her"
:jumly
@found "You", ->
@loop ->
@message "call", "Her"
p If you give a string as first argument, it becomes a condition for the loop.
:code(type=javascript)
@found "You", ->
@loop "[until she answer]", ->
@message "call", "Her"
:jumly
@found "You", ->
@loop "[until she answer]", ->
@message "call", "Her"
.subsection#_fragment
h4 @fragment
p is a generic directive to make fragmentation like <code>@alt</code> and <code>loop</code>.
|If you use this directive, you can create a fragment with arbitrary label you want.
:code(type=javascript)
@found "Thread-A", ->
@fragment "critical section":->
@message "acquire", "Mutex"
@message "do something"
@message "release", "Mutex"
:jumly
@found "Thread-A", ->
@fragment "critical section":->
@message "acquire", "Mutex"
@message "do something"
@message "release", "Mutex"
.subsection#_ref
h4 @ref
p is a directive to move to another diagram.
:code(type=javascript)
@found "MacOSX", ->
@ref "initialize"
:jumly
@found "MacOSX", ->
@ref "initialize"
p T.B.D
.subsection#_note
h4 @note
p is a directive to put note element everywhere.
:code(type=javascript)
@found "She", ->
@note "Eventually"
@message "meets", "You", ->
@note "can't do anything then"
@note "Just say good bye..."
:jumly
@found "She", ->
@note "Eventually"
@message "meets", "You", ->
@note "can't do anything then"
@note "Just say good bye..."
h3#_robustness_diagram Robustness Diagram
.subsection#_actor
h4 @actor
.subsection#_view
h4 @view
.subsection#_controller
h4 @controller
.subsection#_entity
h4 @entity
p TBD
section#_css_classes
h2 CSS classes
p All nodes has a few classes of CSS because JUMLY layouts them.
| You can use them because of your some favors, for example,
| to refer a specific node and change the background color.
p <a href='//jquery.com'>jQuery</a> can be used to select nodes like
:code(type=javascript)
$(".diagram:eq(2) .participant").css({color:"red");
p
<a href="/#example1">This example</a> is one of good examples for styling with CSS.
p TBD.
section#_reference_by_var
h2 Reference by var
p TBD.
footer
.copyright
include _includes/copyright
include _includes/fork-me-rt