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 | |
package org.argouml.uml.cognitive.checklist; |
40 | |
|
41 | |
import org.argouml.cognitive.checklist.CheckItem; |
42 | |
import org.argouml.cognitive.checklist.CheckManager; |
43 | |
import org.argouml.cognitive.checklist.Checklist; |
44 | |
import org.argouml.i18n.Translator; |
45 | |
import org.argouml.model.Model; |
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | 0 | public class Init { |
55 | |
|
56 | |
|
57 | |
|
58 | |
public static void init() { |
59 | 900 | createChecklists(); |
60 | 900 | } |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
private static void newCheckItem(String category, String key, |
72 | |
Checklist checklist) { |
73 | 180000 | CheckItem checkitem = |
74 | |
new UMLCheckItem(category, Translator.localize(key)); |
75 | 180000 | checklist.add(checkitem); |
76 | 180000 | } |
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
|
97 | |
private static void createChecklists() { |
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
Checklist cl; |
106 | |
String cat; |
107 | |
|
108 | |
|
109 | 900 | cl = new Checklist(); |
110 | |
|
111 | 900 | cat = Translator.localize("checklist.class.naming"); |
112 | 900 | newCheckItem(cat, "checklist.class.naming.describe-clearly", cl); |
113 | 900 | newCheckItem(cat, "checklist.class.naming.is-noun", cl); |
114 | 900 | newCheckItem(cat, "checklist.class.naming.misinterpret", cl); |
115 | |
|
116 | 900 | cat = Translator.localize("checklist.class.encoding"); |
117 | 900 | newCheckItem(cat, "checklist.class.encoding.convert-to-attribute", cl); |
118 | 900 | newCheckItem(cat, "checklist.class.encoding.do-just-one-thing", cl); |
119 | 900 | newCheckItem(cat, "checklist.class.encoding.break-into-parts", cl); |
120 | |
|
121 | 900 | cat = Translator.localize("checklist.class.value"); |
122 | 900 | newCheckItem(cat, "checklist.class.value.start-with-meaningful-values", |
123 | |
cl); |
124 | 900 | newCheckItem(cat, "checklist.class.value.convert-to-invariant", cl); |
125 | 900 | newCheckItem(cat, |
126 | |
"checklist.class.value.establish-invariant-in-constructors", |
127 | |
cl); |
128 | 900 | newCheckItem(cat, "checklist.class.value.maintain-invariant", cl); |
129 | |
|
130 | 900 | cat = Translator.localize("checklist.class.location"); |
131 | 900 | newCheckItem(cat, "checklist.class.location.move-somewhere", cl); |
132 | 900 | newCheckItem(cat, "checklist.class.location.planned-subclasses", cl); |
133 | 900 | newCheckItem(cat, "checklist.class.location.eliminate-from-model", cl); |
134 | 900 | newCheckItem(cat, |
135 | |
"checklist.class.location.eliminates-or-affects-something-else", |
136 | |
cl); |
137 | |
|
138 | 900 | cat = Translator.localize("checklist.class.updates"); |
139 | 900 | newCheckItem(cat, "checklist.class.updates.reasons-for-update", cl); |
140 | 900 | newCheckItem(cat, "checklist.class.updates.affects-something-else", cl); |
141 | |
|
142 | 900 | CheckManager.register(Model.getMetaTypes().getUMLClass(), cl); |
143 | |
|
144 | |
|
145 | |
|
146 | 900 | cl = new Checklist(); |
147 | |
|
148 | 900 | cat = Translator.localize("checklist.attribute.naming"); |
149 | 900 | newCheckItem(cat, "checklist.attribute.naming.describe-clearly", cl); |
150 | 900 | newCheckItem(cat, "checklist.attribute.naming.is-noun", cl); |
151 | 900 | newCheckItem(cat, "checklist.attribute.naming.misinterpret", cl); |
152 | |
|
153 | 900 | cat = Translator.localize("checklist.attribute.encoding"); |
154 | 900 | newCheckItem(cat, "checklist.attribute.encoding.is-too-restrictive", |
155 | |
cl); |
156 | 900 | newCheckItem(cat, |
157 | |
"checklist.attribute.encoding.allow-impossible-values", |
158 | |
cl); |
159 | 900 | newCheckItem(cat, "checklist.attribute.encoding.combine-with-other", |
160 | |
cl); |
161 | 900 | newCheckItem(cat, "checklist.attribute.encoding.break-into-parts", cl); |
162 | 900 | newCheckItem(cat, "checklist.attribute.encoding.is-computable", cl); |
163 | |
|
164 | 900 | cat = Translator.localize("checklist.attribute.value"); |
165 | 900 | newCheckItem(cat, "checklist.attribute.value.default-value", cl); |
166 | 900 | newCheckItem(cat, "checklist.attribute.value.correct-default-value", |
167 | |
cl); |
168 | 900 | newCheckItem(cat, "checklist.attribute.value.is-correctness-checkable", |
169 | |
cl); |
170 | |
|
171 | 900 | cat = Translator.localize("checklist.attribute.location"); |
172 | 900 | newCheckItem(cat, "checklist.attribute.location.move-somewhere", cl); |
173 | 900 | newCheckItem(cat, "checklist.attribute.location.move-up-hierarchy", cl); |
174 | 900 | newCheckItem(cat, "checklist.attribute.location.include-all", cl); |
175 | 900 | newCheckItem(cat, "checklist.attribute.location.could-be-eliminated", |
176 | |
cl); |
177 | 900 | newCheckItem(cat, |
178 | |
"checklist.attribute.location.eliminates-or-affects-something-else", |
179 | |
cl); |
180 | |
|
181 | 900 | cat = Translator.localize("checklist.attribute.updates"); |
182 | 900 | newCheckItem(cat, "checklist.attribute.updates.reasons-for-update", cl); |
183 | 900 | newCheckItem(cat, "checklist.attribute.updates.affects-something-else", |
184 | |
cl); |
185 | 900 | newCheckItem(cat, |
186 | |
"checklist.attribute.updates.exists-method-for-update", |
187 | |
cl); |
188 | 900 | newCheckItem(cat, |
189 | |
"checklist.attribute.updates.exists-method-for-specific-value", |
190 | |
cl); |
191 | |
|
192 | 900 | CheckManager.register(Model.getMetaTypes().getAttribute(), cl); |
193 | |
|
194 | |
|
195 | |
|
196 | 900 | cl = new Checklist(); |
197 | |
|
198 | 900 | cat = Translator.localize("checklist.operation.naming"); |
199 | 900 | newCheckItem(cat, "checklist.operation.naming.describe-clearly", cl); |
200 | 900 | newCheckItem(cat, "checklist.operation.naming.is-verb", cl); |
201 | 900 | newCheckItem(cat, "checklist.operation.naming.misinterpret", cl); |
202 | 900 | newCheckItem(cat, "checklist.operation.naming.do-just-one-thing", cl); |
203 | |
|
204 | 900 | cat = Translator.localize("checklist.operation.encoding"); |
205 | 900 | newCheckItem(cat, |
206 | |
"checklist.operation.encoding.is-returntype-too-restrictive", |
207 | |
cl); |
208 | 900 | newCheckItem(cat, |
209 | |
"checklist.operation.encoding.does-returntype-allow-impossible-" |
210 | |
+ "values", cl); |
211 | 900 | newCheckItem(cat, |
212 | |
"checklist.operation.encoding.combine-with-other", cl); |
213 | 900 | newCheckItem(cat, "checklist.operation.encoding.break-into-parts", cl); |
214 | 900 | newCheckItem(cat, "checklist.operation.encoding.break-into-series", cl); |
215 | 900 | newCheckItem(cat, "checklist.operation.encoding.reduce-number-of-calls", |
216 | |
cl); |
217 | |
|
218 | 900 | cat = Translator.localize("checklist.operation.value"); |
219 | 900 | newCheckItem(cat, "checklist.operation.value.handle-all-inputs", cl); |
220 | 900 | newCheckItem(cat, "checklist.operation.value.are-special-cases", cl); |
221 | 900 | newCheckItem(cat, "checklist.operation.value.is-correctness-checkable", |
222 | |
cl); |
223 | 900 | newCheckItem(cat, |
224 | |
"checklist.operation.value.express-preconditions-possible", |
225 | |
cl); |
226 | 900 | newCheckItem(cat, |
227 | |
"checklist.operation.value.express-postconditions-possible", |
228 | |
cl); |
229 | 900 | newCheckItem(cat, |
230 | |
"checklist.operation.value.how-behave-preconditions-violated", |
231 | |
cl); |
232 | 900 | newCheckItem(cat, |
233 | |
"checklist.operation.value.how-behave-postconditions-not-achieved", |
234 | |
cl); |
235 | |
|
236 | 900 | cat = Translator.localize("checklist.operation.location"); |
237 | 900 | newCheckItem(cat, "checklist.operation.location.move-somewhere", cl); |
238 | 900 | newCheckItem(cat, "checklist.operation.location.move-up-hierarchy", cl); |
239 | 900 | newCheckItem(cat, "checklist.operation.location.include-all", cl); |
240 | 900 | newCheckItem(cat, "checklist.operation.location.could-be-eliminated", |
241 | |
cl); |
242 | 900 | newCheckItem(cat, |
243 | |
"checklist.operation.location.eliminates-or-affects-something-else", |
244 | |
cl); |
245 | |
|
246 | 900 | CheckManager.register(Model.getMetaTypes().getOperation(), cl); |
247 | |
|
248 | |
|
249 | |
|
250 | |
|
251 | 900 | cl = new Checklist(); |
252 | |
|
253 | 900 | cat = Translator.localize("checklist.association.naming"); |
254 | 900 | newCheckItem(cat, "checklist.association.naming.describe-clearly", cl); |
255 | 900 | newCheckItem(cat, "checklist.association.naming.is-noun", cl); |
256 | 900 | newCheckItem(cat, "checklist.association.naming.misinterpret", cl); |
257 | |
|
258 | 900 | cat = Translator.localize("checklist.association.encoding"); |
259 | 900 | newCheckItem(cat, "checklist.association.encoding.convert-to-attribute", |
260 | |
cl); |
261 | 900 | newCheckItem(cat, "checklist.association.encoding.do-just-one-thing", |
262 | |
cl); |
263 | 900 | newCheckItem(cat, "checklist.association.encoding.break-into-parts", |
264 | |
cl); |
265 | |
|
266 | 900 | cat = Translator.localize("checklist.association.value"); |
267 | 900 | newCheckItem(cat, |
268 | |
"checklist.association.value.start-with-meaningful-values", |
269 | |
cl); |
270 | 900 | newCheckItem(cat, "checklist.association.value.convert-to-invariant", |
271 | |
cl); |
272 | 900 | newCheckItem(cat, |
273 | |
"checklist.association.value.establish-invariant-in-constructors", |
274 | |
cl); |
275 | 900 | newCheckItem(cat, "checklist.association.value.maintain-invariant", cl); |
276 | |
|
277 | 900 | cat = Translator.localize("checklist.association.location"); |
278 | 900 | newCheckItem(cat, "checklist.association.location.move-somewhere", cl); |
279 | 900 | newCheckItem(cat, "checklist.association.location.planned-subclasses", |
280 | |
cl); |
281 | 900 | newCheckItem(cat, "checklist.association.location.eliminate-from-model", |
282 | |
cl); |
283 | 900 | newCheckItem(cat, |
284 | |
"checklist.association.location.eliminates-or-affects-" |
285 | |
+ "something-else", cl); |
286 | |
|
287 | 900 | cat = Translator.localize("checklist.association.updates"); |
288 | 900 | newCheckItem(cat, "checklist.association.updates.reasons-for-update", |
289 | |
cl); |
290 | 900 | newCheckItem(cat, |
291 | |
"checklist.association.updates.affects-something-else", |
292 | |
cl); |
293 | |
|
294 | 900 | CheckManager.register(Model.getMetaTypes().getAssociation(), cl); |
295 | |
|
296 | |
|
297 | |
|
298 | 900 | cl = new Checklist(); |
299 | |
|
300 | 900 | cat = Translator.localize("checklist.interface.naming"); |
301 | 900 | newCheckItem(cat, "checklist.interface.naming.describe-clearly", cl); |
302 | 900 | newCheckItem(cat, "checklist.interface.naming.is-noun", cl); |
303 | 900 | newCheckItem(cat, "checklist.interface.naming.misinterpret", cl); |
304 | |
|
305 | 900 | cat = Translator.localize("checklist.interface.encoding"); |
306 | 900 | newCheckItem(cat, "checklist.interface.encoding.convert-to-attribute", |
307 | |
cl); |
308 | 900 | newCheckItem(cat, "checklist.interface.encoding.do-just-one-thing", cl); |
309 | 900 | newCheckItem(cat, "checklist.interface.encoding.break-into-parts", cl); |
310 | |
|
311 | 900 | cat = Translator.localize("checklist.interface.value"); |
312 | 900 | newCheckItem(cat, |
313 | |
"checklist.interface.value.start-with-meaningful-values", |
314 | |
cl); |
315 | 900 | newCheckItem(cat, "checklist.interface.value.convert-to-invariant", cl); |
316 | 900 | newCheckItem(cat, |
317 | |
"checklist.interface.value.establish-invariant-in-constructors", |
318 | |
cl); |
319 | 900 | newCheckItem(cat, "checklist.interface.value.maintain-invariant", cl); |
320 | |
|
321 | 900 | cat = Translator.localize("checklist.interface.location"); |
322 | 900 | newCheckItem(cat, "checklist.interface.location.move-somewhere", cl); |
323 | 900 | newCheckItem(cat, "checklist.interface.location.planned-subclasses", |
324 | |
cl); |
325 | 900 | newCheckItem(cat, "checklist.interface.location.eliminate-from-model", |
326 | |
cl); |
327 | 900 | newCheckItem(cat, |
328 | |
"checklist.interface.location.eliminates-or-affects-something-else", |
329 | |
cl); |
330 | |
|
331 | 900 | cat = Translator.localize("checklist.interface.updates"); |
332 | 900 | newCheckItem(cat, "checklist.interface.updates.reasons-for-update", cl); |
333 | 900 | newCheckItem(cat, "checklist.interface.updates.affects-something-else", |
334 | |
cl); |
335 | |
|
336 | 900 | CheckManager.register(Model.getMetaTypes().getInterface(), cl); |
337 | |
|
338 | |
|
339 | |
|
340 | 900 | cl = new Checklist(); |
341 | |
|
342 | 900 | cat = Translator.localize("checklist.instance.general"); |
343 | 900 | newCheckItem(cat, "checklist.instance.general.describe-clearly", cl); |
344 | |
|
345 | 900 | cat = Translator.localize("checklist.instance.naming"); |
346 | 900 | newCheckItem(cat, "checklist.instance.naming.describe-clearly", cl); |
347 | 900 | newCheckItem(cat, "checklist.instance.naming.denotes-state", cl); |
348 | 900 | newCheckItem(cat, "checklist.instance.naming.misinterpret", cl); |
349 | |
|
350 | 900 | cat = Translator.localize("checklist.instance.structure"); |
351 | 900 | newCheckItem(cat, "checklist.instance.structure.merged-with-other", cl); |
352 | 900 | newCheckItem(cat, "checklist.instance.structure.do-just-one-thing", cl); |
353 | 900 | newCheckItem(cat, "checklist.instance.structure.break-into-parts", cl); |
354 | 900 | newCheckItem(cat, |
355 | |
"checklist.instance.structure.can-write-characteristic-equation", |
356 | |
cl); |
357 | 900 | newCheckItem(cat, "checklist.instance.structure.belong", cl); |
358 | 900 | newCheckItem(cat, "checklist.instance.structure.make-internal", cl); |
359 | 900 | newCheckItem(cat, |
360 | |
"checklist.instance.structure.is-state-in-another-machine-" |
361 | |
+ "exclusive", cl); |
362 | |
|
363 | 900 | cat = Translator.localize("checklist.instance.actions"); |
364 | 900 | newCheckItem(cat, "checklist.instance.actions.list-entry-actions", cl); |
365 | 900 | newCheckItem(cat, |
366 | |
"checklist.instance.actions.update-attribute-on-entry", |
367 | |
cl); |
368 | 900 | newCheckItem(cat, "checklist.instance.actions.list-exit-action", cl); |
369 | 900 | newCheckItem(cat, "checklist.instance.actions.update-attribute-on-exit", |
370 | |
cl); |
371 | 900 | newCheckItem(cat, "checklist.instance.actions.list-do-action", cl); |
372 | 900 | newCheckItem(cat, "checklist.instance.actions.maintained-state", cl); |
373 | |
|
374 | 900 | cat = Translator.localize("checklist.instance.transitions"); |
375 | 900 | newCheckItem(cat, |
376 | |
"checklist.instance.transitions.need-another-transition-into", |
377 | |
cl); |
378 | 900 | newCheckItem(cat, |
379 | |
"checklist.instance.transitions.use-all-transitions-into", |
380 | |
cl); |
381 | 900 | newCheckItem(cat, |
382 | |
"checklist.instance.transitions.combine-with-other-incoming", |
383 | |
cl); |
384 | 900 | newCheckItem(cat, |
385 | |
"checklist.instance.transitions.need-another-transition-out-of", |
386 | |
cl); |
387 | 900 | newCheckItem(cat, |
388 | |
"checklist.instance.transitions.use-all-transitions-out-of", |
389 | |
cl); |
390 | 900 | newCheckItem(cat, |
391 | |
"checklist.instance.transitions.are-transitions-out-of-exclusive", |
392 | |
cl); |
393 | 900 | newCheckItem(cat, |
394 | |
"checklist.instance.transitions.combine-with-other-outgoing", |
395 | |
cl); |
396 | |
|
397 | 900 | CheckManager.register(Model.getMetaTypes().getInstance(), cl); |
398 | |
|
399 | |
|
400 | |
|
401 | 900 | cl = new Checklist(); |
402 | |
|
403 | 900 | cat = Translator.localize("checklist.link.naming"); |
404 | 900 | newCheckItem(cat, "checklist.link.naming.describe-clearly", cl); |
405 | 900 | newCheckItem(cat, "checklist.link.naming.is-noun", cl); |
406 | 900 | newCheckItem(cat, "checklist.link.naming.misinterpret", cl); |
407 | |
|
408 | 900 | cat = Translator.localize("checklist.link.encoding"); |
409 | 900 | newCheckItem(cat, "checklist.link.encoding.convert-to-attribute", cl); |
410 | 900 | newCheckItem(cat, "checklist.link.encoding.do-just-one-thing", cl); |
411 | 900 | newCheckItem(cat, "checklist.link.encoding.break-into-parts", cl); |
412 | |
|
413 | 900 | cat = Translator.localize("checklist.link.value"); |
414 | 900 | newCheckItem(cat, "checklist.link.value.start-with-meaningful-values", |
415 | |
cl); |
416 | 900 | newCheckItem(cat, "checklist.link.value.convert-to-invariant", cl); |
417 | 900 | newCheckItem(cat, |
418 | |
"checklist.link.value.establish-invariant-in-constructors", |
419 | |
cl); |
420 | 900 | newCheckItem(cat, "checklist.link.value.maintain-invariant", cl); |
421 | |
|
422 | 900 | cat = Translator.localize("checklist.link.location"); |
423 | 900 | newCheckItem(cat, "checklist.link.location.move-somewhere", cl); |
424 | 900 | newCheckItem(cat, "checklist.link.location.planned-subclasses", cl); |
425 | 900 | newCheckItem(cat, "checklist.link.location.eliminate-from-model", cl); |
426 | 900 | newCheckItem(cat, |
427 | |
"checklist.link.location.eliminates-or-affects-something-else", |
428 | |
cl); |
429 | |
|
430 | 900 | cat = Translator.localize("checklist.link.updates"); |
431 | 900 | newCheckItem(cat, "checklist.link.updates.reasons-for-update", cl); |
432 | 900 | newCheckItem(cat, "checklist.link.updates.affects-something-else", cl); |
433 | |
|
434 | 900 | CheckManager.register(Model.getMetaTypes().getLink(), cl); |
435 | |
|
436 | |
|
437 | |
|
438 | 900 | cl = new Checklist(); |
439 | |
|
440 | 900 | cat = Translator.localize("checklist.state.naming"); |
441 | 900 | newCheckItem(cat, "checklist.state.naming.describe-clearly", cl); |
442 | 900 | newCheckItem(cat, "checklist.state.naming.denotes-state", cl); |
443 | 900 | newCheckItem(cat, "checklist.state.naming.misinterpret", cl); |
444 | |
|
445 | 900 | cat = Translator.localize("checklist.state.structure"); |
446 | 900 | newCheckItem(cat, "checklist.state.structure.merged-with-other", cl); |
447 | 900 | newCheckItem(cat, "checklist.state.structure.do-just-one-thing", cl); |
448 | 900 | newCheckItem(cat, "checklist.state.structure.break-into-parts", cl); |
449 | 900 | newCheckItem(cat, |
450 | |
"checklist.state.structure.can-write-characteristic-equation", |
451 | |
cl); |
452 | 900 | newCheckItem(cat, "checklist.state.structure.belong", cl); |
453 | 900 | newCheckItem(cat, "checklist.state.structure.make-internal", cl); |
454 | 900 | newCheckItem(cat, |
455 | |
"checklist.state.structure.is-state-in-another-machine-exclusive", |
456 | |
cl); |
457 | |
|
458 | 900 | cat = Translator.localize("checklist.state.actions"); |
459 | 900 | newCheckItem(cat, "checklist.state.actions.list-entry-actions", cl); |
460 | 900 | newCheckItem(cat, "checklist.state.actions.update-attribute-on-entry", |
461 | |
cl); |
462 | 900 | newCheckItem(cat, "checklist.state.actions.list-exit-action", cl); |
463 | 900 | newCheckItem(cat, "checklist.state.actions.update-attribute-on-exit", |
464 | |
cl); |
465 | 900 | newCheckItem(cat, "checklist.state.actions.list-do-action", cl); |
466 | 900 | newCheckItem(cat, "checklist.state.actions.maintained-state", cl); |
467 | |
|
468 | 900 | cat = Translator.localize("checklist.state.transitions"); |
469 | 900 | newCheckItem(cat, |
470 | |
"checklist.state.transitions.need-another-transition-into", |
471 | |
cl); |
472 | 900 | newCheckItem(cat, |
473 | |
"checklist.state.transitions.use-all-transitions-into", |
474 | |
cl); |
475 | 900 | newCheckItem(cat, |
476 | |
"checklist.state.transitions.combine-with-other-incoming", |
477 | |
cl); |
478 | 900 | newCheckItem(cat, |
479 | |
"checklist.state.transitions.need-another-transition-out-of", |
480 | |
cl); |
481 | 900 | newCheckItem(cat, |
482 | |
"checklist.state.transitions.use-all-transitions-out-of", |
483 | |
cl); |
484 | 900 | newCheckItem(cat, |
485 | |
"checklist.state.transitions.are-transitions-out-of-exclusive", |
486 | |
cl); |
487 | 900 | newCheckItem(cat, |
488 | |
"checklist.state.transitions.combine-with-other-outgoing", |
489 | |
cl); |
490 | |
|
491 | 900 | CheckManager.register(Model.getMetaTypes().getState(), cl); |
492 | |
|
493 | |
|
494 | |
|
495 | 900 | cl = new Checklist(); |
496 | |
|
497 | 900 | cat = Translator.localize("checklist.transition.structure"); |
498 | 900 | newCheckItem(cat, "checklist.transition.structure.start-somewhere-else", |
499 | |
cl); |
500 | 900 | newCheckItem(cat, "checklist.transition.structure.end-somewhere-else", |
501 | |
cl); |
502 | 900 | newCheckItem(cat, |
503 | |
"checklist.transition.structure.need-another-like-this", |
504 | |
cl); |
505 | 900 | newCheckItem(cat, |
506 | |
"checklist.transition.structure.unneeded-because-of-this", |
507 | |
cl); |
508 | |
|
509 | 900 | cat = Translator.localize("checklist.transition.trigger"); |
510 | 900 | newCheckItem(cat, "checklist.transition.trigger.needed", cl); |
511 | 900 | newCheckItem(cat, "checklist.transition.trigger.happen-too-often", cl); |
512 | 900 | newCheckItem(cat, "checklist.transition.trigger.happen-too-rarely", cl); |
513 | |
|
514 | 900 | cat = Translator.localize("checklist.transition.guard"); |
515 | 900 | newCheckItem(cat, "checklist.transition.guard.taken-too-often", cl); |
516 | 900 | newCheckItem(cat, "checklist.transition.guard.is-too-restrictive", cl); |
517 | 900 | newCheckItem(cat, "checklist.transition.guard.break-into-parts", cl); |
518 | |
|
519 | 900 | cat = Translator.localize("checklist.transition.actions"); |
520 | 900 | newCheckItem(cat, "checklist.transition.actions.should-have", cl); |
521 | 900 | newCheckItem(cat, "checklist.transition.actions.should-have-exit", cl); |
522 | 900 | newCheckItem(cat, "checklist.transition.actions.should-have-entry", cl); |
523 | 900 | newCheckItem(cat, "checklist.transition.actions.is-precondition-met", |
524 | |
cl); |
525 | 900 | newCheckItem(cat, |
526 | |
"checklist.transition.actions.is-postcondition-consistant-with-" |
527 | |
+ "destination", cl); |
528 | |
|
529 | 900 | CheckManager.register(Model.getMetaTypes().getTransition(), cl); |
530 | |
|
531 | |
|
532 | |
|
533 | 900 | cl = new Checklist(); |
534 | |
|
535 | 900 | cat = Translator.localize("checklist.usecase.naming"); |
536 | 900 | newCheckItem(cat, "checklist.usecase.naming.describe-clearly", cl); |
537 | 900 | newCheckItem(cat, "checklist.usecase.naming.is-noun", cl); |
538 | 900 | newCheckItem(cat, "checklist.usecase.naming.misinterpret", cl); |
539 | |
|
540 | 900 | cat = Translator.localize("checklist.usecase.encoding"); |
541 | 900 | newCheckItem(cat, "checklist.usecase.encoding.convert-to-attribute", |
542 | |
cl); |
543 | 900 | newCheckItem(cat, "checklist.usecase.encoding.do-just-one-thing", cl); |
544 | 900 | newCheckItem(cat, "checklist.usecase.encoding.break-into-parts", cl); |
545 | |
|
546 | 900 | cat = Translator.localize("checklist.usecase.value"); |
547 | 900 | newCheckItem(cat, |
548 | |
"checklist.usecase.value.start-with-meaningful-values", |
549 | |
cl); |
550 | 900 | newCheckItem(cat, "checklist.usecase.value.convert-to-invariant", cl); |
551 | 900 | newCheckItem(cat, |
552 | |
"checklist.usecase.value.establish-invariant-in-constructors", |
553 | |
cl); |
554 | 900 | newCheckItem(cat, "checklist.usecase.value.maintain-invariant", cl); |
555 | |
|
556 | 900 | cat = Translator.localize("checklist.usecase.location"); |
557 | 900 | newCheckItem(cat, "checklist.usecase.location.move-somewhere", cl); |
558 | 900 | newCheckItem(cat, "checklist.usecase.location.planned-subclasses", cl); |
559 | 900 | newCheckItem(cat, "checklist.usecase.location.eliminate-from-model", |
560 | |
cl); |
561 | 900 | newCheckItem(cat, |
562 | |
"checklist.usecase.location.eliminates-or-affects-something-else", |
563 | |
cl); |
564 | |
|
565 | 900 | cat = Translator.localize("checklist.usecase.updates"); |
566 | 900 | newCheckItem(cat, "checklist.usecase.updates.reasons-for-update", cl); |
567 | 900 | newCheckItem(cat, "checklist.usecase.updates.affects-something-else", |
568 | |
cl); |
569 | |
|
570 | 900 | CheckManager.register(Model.getMetaTypes().getUseCase(), cl); |
571 | |
|
572 | |
|
573 | |
|
574 | 900 | cl = new Checklist(); |
575 | |
|
576 | 900 | cat = Translator.localize("checklist.actor.naming"); |
577 | 900 | newCheckItem(cat, "checklist.actor.naming.describe-clearly", cl); |
578 | 900 | newCheckItem(cat, "checklist.actor.naming.is-noun", cl); |
579 | 900 | newCheckItem(cat, "checklist.actor.naming.misinterpret", cl); |
580 | |
|
581 | 900 | cat = Translator.localize("checklist.actor.encoding"); |
582 | 900 | newCheckItem(cat, "checklist.actor.encoding.convert-to-attribute", cl); |
583 | 900 | newCheckItem(cat, "checklist.actor.encoding.do-just-one-thing", cl); |
584 | 900 | newCheckItem(cat, "checklist.actor.encoding.break-into-parts", cl); |
585 | |
|
586 | 900 | cat = Translator.localize("checklist.actor.value"); |
587 | 900 | newCheckItem(cat, "checklist.actor.value.start-with-meaningful-values", |
588 | |
cl); |
589 | 900 | newCheckItem(cat, "checklist.actor.value.convert-to-invariant", cl); |
590 | 900 | newCheckItem(cat, |
591 | |
"checklist.actor.value.establish-invariant-in-constructors", |
592 | |
cl); |
593 | 900 | newCheckItem(cat, "checklist.actor.value.maintain-invariant", cl); |
594 | |
|
595 | 900 | cat = Translator.localize("checklist.actor.location"); |
596 | 900 | newCheckItem(cat, "checklist.actor.location.move-somewhere", cl); |
597 | 900 | newCheckItem(cat, "checklist.actor.location.planned-subclasses", cl); |
598 | 900 | newCheckItem(cat, "checklist.actor.location.eliminate-from-model", cl); |
599 | 900 | newCheckItem(cat, |
600 | |
"checklist.actor.location.eliminates-or-affects-something-else", |
601 | |
cl); |
602 | |
|
603 | 900 | cat = Translator.localize("checklist.actor.updates"); |
604 | 900 | newCheckItem(cat, "checklist.actor.updates.reasons-for-update", cl); |
605 | 900 | newCheckItem(cat, "checklist.actor.updates.affects-something-else", cl); |
606 | |
|
607 | 900 | CheckManager.register(Model.getMetaTypes().getActor(), cl); |
608 | |
|
609 | 900 | } |
610 | |
|
611 | |
} |