1 | /* |
2 | * Copyright 2006 SDQ Research Group, University of Karlsruhe (TH) |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.seff.part; |
5 | |
6 | import java.util.ArrayList; |
7 | import java.util.List; |
8 | |
9 | import org.eclipse.gef.Tool; |
10 | import org.eclipse.gef.palette.PaletteContainer; |
11 | import org.eclipse.gef.palette.PaletteDrawer; |
12 | import org.eclipse.gef.palette.PaletteRoot; |
13 | import org.eclipse.gef.palette.ToolEntry; |
14 | import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool; |
15 | import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool; |
16 | |
17 | import de.uka.ipd.sdq.pcm.gmf.seff.providers.PalladioComponentModelElementTypes; |
18 | |
19 | /** |
20 | * @generated |
21 | */ |
22 | public class PalladioComponentModelPaletteFactory { |
23 | |
24 | /** |
25 | * @generated |
26 | */ |
27 | public void fillPalette(PaletteRoot paletteRoot) { |
28 | paletteRoot.add(createActions1Group()); |
29 | paletteRoot.add(createActionDetails2Group()); |
30 | paletteRoot.add(createLinks3Group()); |
31 | } |
32 | |
33 | /** |
34 | * Creates "Actions" palette tool group |
35 | * @generated |
36 | */ |
37 | private PaletteContainer createActions1Group() { |
38 | PaletteDrawer paletteContainer = new PaletteDrawer( |
39 | Messages.Actions1Group_title); |
40 | paletteContainer.setId("createActions1Group"); //$NON-NLS-1$ |
41 | paletteContainer.setDescription(Messages.Actions1Group_desc); |
42 | paletteContainer.add(createStartAction1CreationTool()); |
43 | paletteContainer.add(createStopAction2CreationTool()); |
44 | paletteContainer.add(createInternalAction3CreationTool()); |
45 | paletteContainer.add(createExternalCallAction4CreationTool()); |
46 | paletteContainer.add(createEmitEventAction5CreationTool()); |
47 | paletteContainer.add(createSetVariableAction6CreationTool()); |
48 | paletteContainer.add(createAcquireAction7CreationTool()); |
49 | paletteContainer.add(createReleaseAction8CreationTool()); |
50 | paletteContainer.add(createLoopAction9CreationTool()); |
51 | paletteContainer.add(createCollectionIteratorAction10CreationTool()); |
52 | paletteContainer.add(createBranchAction11CreationTool()); |
53 | paletteContainer.add(createForkAction12CreationTool()); |
54 | paletteContainer.add(createRecoveryAction13CreationTool()); |
55 | return paletteContainer; |
56 | } |
57 | |
58 | /** |
59 | * Creates "Action Details" palette tool group |
60 | * @generated |
61 | */ |
62 | private PaletteContainer createActionDetails2Group() { |
63 | PaletteDrawer paletteContainer = new PaletteDrawer( |
64 | Messages.ActionDetails2Group_title); |
65 | paletteContainer.setId("createActionDetails2Group"); //$NON-NLS-1$ |
66 | paletteContainer.add(createResourceDemand1CreationTool()); |
67 | paletteContainer.add(createVariableUsage2CreationTool()); |
68 | paletteContainer.add(createVariableCharacterisation3CreationTool()); |
69 | paletteContainer.add(createFailureOccurrenceDescription4CreationTool()); |
70 | paletteContainer.add(createResourceDemandingBehaviour5CreationTool()); |
71 | paletteContainer.add(createSynchronisationPoint6CreationTool()); |
72 | paletteContainer |
73 | .add(createProbabilisticBranchTransition7CreationTool()); |
74 | paletteContainer.add(createGuardedBranchTransition8CreationTool()); |
75 | paletteContainer.add(createRecoveryActionBehaviour9CreationTool()); |
76 | paletteContainer.add(createInfrastructureCall10CreationTool()); |
77 | return paletteContainer; |
78 | } |
79 | |
80 | /** |
81 | * Creates "Links" palette tool group |
82 | * @generated |
83 | */ |
84 | private PaletteContainer createLinks3Group() { |
85 | PaletteDrawer paletteContainer = new PaletteDrawer( |
86 | Messages.Links3Group_title); |
87 | paletteContainer.setId("createLinks3Group"); //$NON-NLS-1$ |
88 | paletteContainer.add(createControlFlow1CreationTool()); |
89 | paletteContainer.add(createRecoveryFlow2CreationTool()); |
90 | return paletteContainer; |
91 | } |
92 | |
93 | /** |
94 | * @generated |
95 | */ |
96 | private ToolEntry createStartAction1CreationTool() { |
97 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
98 | types.add(PalladioComponentModelElementTypes.StartAction_2001); |
99 | types.add(PalladioComponentModelElementTypes.StartAction_3004); |
100 | NodeToolEntry entry = new NodeToolEntry( |
101 | Messages.StartAction1CreationTool_title, |
102 | Messages.StartAction1CreationTool_desc, types); |
103 | entry.setId("createStartAction1CreationTool"); //$NON-NLS-1$ |
104 | entry |
105 | .setSmallIcon(PalladioComponentModelElementTypes |
106 | .getImageDescriptor(PalladioComponentModelElementTypes.StartAction_2001)); |
107 | entry.setLargeIcon(entry.getSmallIcon()); |
108 | return entry; |
109 | } |
110 | |
111 | /** |
112 | * @generated |
113 | */ |
114 | private ToolEntry createStopAction2CreationTool() { |
115 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
116 | types.add(PalladioComponentModelElementTypes.StopAction_2002); |
117 | types.add(PalladioComponentModelElementTypes.StopAction_3005); |
118 | NodeToolEntry entry = new NodeToolEntry( |
119 | Messages.StopAction2CreationTool_title, |
120 | Messages.StopAction2CreationTool_desc, types); |
121 | entry.setId("createStopAction2CreationTool"); //$NON-NLS-1$ |
122 | entry |
123 | .setSmallIcon(PalladioComponentModelElementTypes |
124 | .getImageDescriptor(PalladioComponentModelElementTypes.StopAction_2002)); |
125 | entry.setLargeIcon(entry.getSmallIcon()); |
126 | return entry; |
127 | } |
128 | |
129 | /** |
130 | * @generated |
131 | */ |
132 | private ToolEntry createInternalAction3CreationTool() { |
133 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
134 | types.add(PalladioComponentModelElementTypes.InternalAction_3007); |
135 | types.add(PalladioComponentModelElementTypes.InternalAction_2006); |
136 | NodeToolEntry entry = new NodeToolEntry( |
137 | Messages.InternalAction3CreationTool_title, |
138 | Messages.InternalAction3CreationTool_desc, types); |
139 | entry.setId("createInternalAction3CreationTool"); //$NON-NLS-1$ |
140 | entry |
141 | .setSmallIcon(PalladioComponentModelElementTypes |
142 | .getImageDescriptor(PalladioComponentModelElementTypes.InternalAction_3007)); |
143 | entry.setLargeIcon(entry.getSmallIcon()); |
144 | return entry; |
145 | } |
146 | |
147 | /** |
148 | * @generated |
149 | */ |
150 | private ToolEntry createExternalCallAction4CreationTool() { |
151 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
152 | types.add(PalladioComponentModelElementTypes.ExternalCallAction_2003); |
153 | types.add(PalladioComponentModelElementTypes.ExternalCallAction_3012); |
154 | NodeToolEntry entry = new NodeToolEntry( |
155 | Messages.ExternalCallAction4CreationTool_title, |
156 | Messages.ExternalCallAction4CreationTool_desc, types); |
157 | entry.setId("createExternalCallAction4CreationTool"); //$NON-NLS-1$ |
158 | entry |
159 | .setSmallIcon(PalladioComponentModelElementTypes |
160 | .getImageDescriptor(PalladioComponentModelElementTypes.ExternalCallAction_2003)); |
161 | entry.setLargeIcon(entry.getSmallIcon()); |
162 | return entry; |
163 | } |
164 | |
165 | /** |
166 | * @generated |
167 | */ |
168 | private ToolEntry createEmitEventAction5CreationTool() { |
169 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
170 | types.add(PalladioComponentModelElementTypes.EmitEventAction_2013); |
171 | types.add(PalladioComponentModelElementTypes.EmitEventAction_3046); |
172 | NodeToolEntry entry = new NodeToolEntry( |
173 | Messages.EmitEventAction5CreationTool_title, |
174 | Messages.EmitEventAction5CreationTool_desc, types); |
175 | entry.setId("createEmitEventAction5CreationTool"); //$NON-NLS-1$ |
176 | entry |
177 | .setSmallIcon(PalladioComponentModelElementTypes |
178 | .getImageDescriptor(PalladioComponentModelElementTypes.EmitEventAction_2013)); |
179 | entry.setLargeIcon(entry.getSmallIcon()); |
180 | return entry; |
181 | } |
182 | |
183 | /** |
184 | * @generated |
185 | */ |
186 | private ToolEntry createSetVariableAction6CreationTool() { |
187 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
188 | types.add(PalladioComponentModelElementTypes.SetVariableAction_3024); |
189 | types.add(PalladioComponentModelElementTypes.SetVariableAction_2008); |
190 | NodeToolEntry entry = new NodeToolEntry( |
191 | Messages.SetVariableAction6CreationTool_title, |
192 | Messages.SetVariableAction6CreationTool_desc, types); |
193 | entry.setId("createSetVariableAction6CreationTool"); //$NON-NLS-1$ |
194 | entry |
195 | .setSmallIcon(PalladioComponentModelElementTypes |
196 | .getImageDescriptor(PalladioComponentModelElementTypes.SetVariableAction_3024)); |
197 | entry.setLargeIcon(entry.getSmallIcon()); |
198 | return entry; |
199 | } |
200 | |
201 | /** |
202 | * @generated |
203 | */ |
204 | private ToolEntry createAcquireAction7CreationTool() { |
205 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
206 | types.add(PalladioComponentModelElementTypes.AcquireAction_3026); |
207 | types.add(PalladioComponentModelElementTypes.AcquireAction_2012); |
208 | NodeToolEntry entry = new NodeToolEntry( |
209 | Messages.AcquireAction7CreationTool_title, |
210 | Messages.AcquireAction7CreationTool_desc, types); |
211 | entry.setId("createAcquireAction7CreationTool"); //$NON-NLS-1$ |
212 | entry |
213 | .setSmallIcon(PalladioComponentModelElementTypes |
214 | .getImageDescriptor(PalladioComponentModelElementTypes.AcquireAction_3026)); |
215 | entry.setLargeIcon(entry.getSmallIcon()); |
216 | return entry; |
217 | } |
218 | |
219 | /** |
220 | * @generated |
221 | */ |
222 | private ToolEntry createReleaseAction8CreationTool() { |
223 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
224 | types.add(PalladioComponentModelElementTypes.ReleaseAction_3020); |
225 | types.add(PalladioComponentModelElementTypes.ReleaseAction_2010); |
226 | NodeToolEntry entry = new NodeToolEntry( |
227 | Messages.ReleaseAction8CreationTool_title, |
228 | Messages.ReleaseAction8CreationTool_desc, types); |
229 | entry.setId("createReleaseAction8CreationTool"); //$NON-NLS-1$ |
230 | entry |
231 | .setSmallIcon(PalladioComponentModelElementTypes |
232 | .getImageDescriptor(PalladioComponentModelElementTypes.ReleaseAction_3020)); |
233 | entry.setLargeIcon(entry.getSmallIcon()); |
234 | return entry; |
235 | } |
236 | |
237 | /** |
238 | * @generated |
239 | */ |
240 | private ToolEntry createLoopAction9CreationTool() { |
241 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
242 | types.add(PalladioComponentModelElementTypes.LoopAction_2004); |
243 | types.add(PalladioComponentModelElementTypes.LoopAction_3006); |
244 | NodeToolEntry entry = new NodeToolEntry( |
245 | Messages.LoopAction9CreationTool_title, |
246 | Messages.LoopAction9CreationTool_desc, types); |
247 | entry.setId("createLoopAction9CreationTool"); //$NON-NLS-1$ |
248 | entry |
249 | .setSmallIcon(PalladioComponentModelElementTypes |
250 | .getImageDescriptor(PalladioComponentModelElementTypes.LoopAction_2004)); |
251 | entry.setLargeIcon(entry.getSmallIcon()); |
252 | return entry; |
253 | } |
254 | |
255 | /** |
256 | * @generated |
257 | */ |
258 | private ToolEntry createCollectionIteratorAction10CreationTool() { |
259 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
260 | types |
261 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_3013); |
262 | types |
263 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_2007); |
264 | NodeToolEntry entry = new NodeToolEntry( |
265 | Messages.CollectionIteratorAction10CreationTool_title, |
266 | Messages.CollectionIteratorAction10CreationTool_desc, types); |
267 | entry.setId("createCollectionIteratorAction10CreationTool"); //$NON-NLS-1$ |
268 | entry |
269 | .setSmallIcon(PalladioComponentModelElementTypes |
270 | .getImageDescriptor(PalladioComponentModelElementTypes.CollectionIteratorAction_3013)); |
271 | entry.setLargeIcon(entry.getSmallIcon()); |
272 | return entry; |
273 | } |
274 | |
275 | /** |
276 | * @generated |
277 | */ |
278 | private ToolEntry createBranchAction11CreationTool() { |
279 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
280 | types.add(PalladioComponentModelElementTypes.BranchAction_3009); |
281 | types.add(PalladioComponentModelElementTypes.BranchAction_2005); |
282 | NodeToolEntry entry = new NodeToolEntry( |
283 | Messages.BranchAction11CreationTool_title, |
284 | Messages.BranchAction11CreationTool_desc, types); |
285 | entry.setId("createBranchAction11CreationTool"); //$NON-NLS-1$ |
286 | entry |
287 | .setSmallIcon(PalladioComponentModelElementTypes |
288 | .getImageDescriptor(PalladioComponentModelElementTypes.BranchAction_3009)); |
289 | entry.setLargeIcon(entry.getSmallIcon()); |
290 | return entry; |
291 | } |
292 | |
293 | /** |
294 | * @generated |
295 | */ |
296 | private ToolEntry createForkAction12CreationTool() { |
297 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
298 | types.add(PalladioComponentModelElementTypes.ForkAction_3023); |
299 | types.add(PalladioComponentModelElementTypes.ForkAction_2011); |
300 | NodeToolEntry entry = new NodeToolEntry( |
301 | Messages.ForkAction12CreationTool_title, |
302 | Messages.ForkAction12CreationTool_desc, types); |
303 | entry.setId("createForkAction12CreationTool"); //$NON-NLS-1$ |
304 | entry |
305 | .setSmallIcon(PalladioComponentModelElementTypes |
306 | .getImageDescriptor(PalladioComponentModelElementTypes.ForkAction_3023)); |
307 | entry.setLargeIcon(entry.getSmallIcon()); |
308 | return entry; |
309 | } |
310 | |
311 | /** |
312 | * @generated |
313 | */ |
314 | private ToolEntry createRecoveryAction13CreationTool() { |
315 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
316 | types.add(PalladioComponentModelElementTypes.RecoveryAction_3057); |
317 | types.add(PalladioComponentModelElementTypes.RecoveryAction_2016); |
318 | NodeToolEntry entry = new NodeToolEntry( |
319 | Messages.RecoveryAction13CreationTool_title, |
320 | Messages.RecoveryAction13CreationTool_desc, types); |
321 | entry.setId("createRecoveryAction13CreationTool"); //$NON-NLS-1$ |
322 | entry |
323 | .setSmallIcon(PalladioComponentModelElementTypes |
324 | .getImageDescriptor(PalladioComponentModelElementTypes.RecoveryAction_3057)); |
325 | entry.setLargeIcon(entry.getSmallIcon()); |
326 | return entry; |
327 | } |
328 | |
329 | /** |
330 | * @generated |
331 | */ |
332 | private ToolEntry createResourceDemand1CreationTool() { |
333 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
334 | types |
335 | .add(PalladioComponentModelElementTypes.ParametricResourceDemand_3051); |
336 | NodeToolEntry entry = new NodeToolEntry( |
337 | Messages.ResourceDemand1CreationTool_title, |
338 | Messages.ResourceDemand1CreationTool_desc, types); |
339 | entry.setId("createResourceDemand1CreationTool"); //$NON-NLS-1$ |
340 | entry |
341 | .setSmallIcon(PalladioComponentModelSeffDiagramEditorPlugin |
342 | .findImageDescriptor("/de.uka.ipd.sdq.pcm.edit/icons/full/ctool16/ParametricRessourceDemand.gif")); //$NON-NLS-1$ |
343 | entry.setLargeIcon(entry.getSmallIcon()); |
344 | return entry; |
345 | } |
346 | |
347 | /** |
348 | * @generated |
349 | */ |
350 | private ToolEntry createVariableUsage2CreationTool() { |
351 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(5); |
352 | types.add(PalladioComponentModelElementTypes.VariableUsage_3042); |
353 | types.add(PalladioComponentModelElementTypes.VariableUsage_3049); |
354 | types.add(PalladioComponentModelElementTypes.VariableUsage_3047); |
355 | types.add(PalladioComponentModelElementTypes.VariableUsage_3054); |
356 | types.add(PalladioComponentModelElementTypes.VariableUsage_3036); |
357 | NodeToolEntry entry = new NodeToolEntry( |
358 | Messages.VariableUsage2CreationTool_title, |
359 | Messages.VariableUsage2CreationTool_desc, types); |
360 | entry.setId("createVariableUsage2CreationTool"); //$NON-NLS-1$ |
361 | entry |
362 | .setSmallIcon(PalladioComponentModelElementTypes |
363 | .getImageDescriptor(PalladioComponentModelElementTypes.VariableUsage_3042)); |
364 | entry.setLargeIcon(entry.getSmallIcon()); |
365 | return entry; |
366 | } |
367 | |
368 | /** |
369 | * @generated |
370 | */ |
371 | private ToolEntry createVariableCharacterisation3CreationTool() { |
372 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(5); |
373 | types |
374 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3033); |
375 | types |
376 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3035); |
377 | types |
378 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3037); |
379 | types |
380 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3048); |
381 | types |
382 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3055); |
383 | NodeToolEntry entry = new NodeToolEntry( |
384 | Messages.VariableCharacterisation3CreationTool_title, |
385 | Messages.VariableCharacterisation3CreationTool_desc, types); |
386 | entry.setId("createVariableCharacterisation3CreationTool"); //$NON-NLS-1$ |
387 | entry |
388 | .setSmallIcon(PalladioComponentModelElementTypes |
389 | .getImageDescriptor(PalladioComponentModelElementTypes.VariableCharacterisation_3033)); |
390 | entry.setLargeIcon(entry.getSmallIcon()); |
391 | return entry; |
392 | } |
393 | |
394 | /** |
395 | * @generated |
396 | */ |
397 | private ToolEntry createFailureOccurrenceDescription4CreationTool() { |
398 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
399 | types |
400 | .add(PalladioComponentModelElementTypes.InternalFailureOccurrenceDescription_3050); |
401 | NodeToolEntry entry = new NodeToolEntry( |
402 | Messages.FailureOccurrenceDescription4CreationTool_title, |
403 | Messages.FailureOccurrenceDescription4CreationTool_desc, types); |
404 | entry.setId("createFailureOccurrenceDescription4CreationTool"); //$NON-NLS-1$ |
405 | entry |
406 | .setSmallIcon(PalladioComponentModelElementTypes |
407 | .getImageDescriptor(PalladioComponentModelElementTypes.InternalFailureOccurrenceDescription_3050)); |
408 | entry.setLargeIcon(entry.getSmallIcon()); |
409 | return entry; |
410 | } |
411 | |
412 | /** |
413 | * @generated |
414 | */ |
415 | private ToolEntry createResourceDemandingBehaviour5CreationTool() { |
416 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(6); |
417 | types |
418 | .add(PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3003); |
419 | types |
420 | .add(PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3011); |
421 | types.add(PalladioComponentModelElementTypes.ForkedBehaviour_3027); |
422 | types |
423 | .add(PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3014); |
424 | types.add(PalladioComponentModelElementTypes.ForkedBehaviour_3039); |
425 | types |
426 | .add(PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3018); |
427 | NodeToolEntry entry = new NodeToolEntry( |
428 | Messages.ResourceDemandingBehaviour5CreationTool_title, |
429 | Messages.ResourceDemandingBehaviour5CreationTool_desc, types); |
430 | entry.setId("createResourceDemandingBehaviour5CreationTool"); //$NON-NLS-1$ |
431 | entry |
432 | .setSmallIcon(PalladioComponentModelElementTypes |
433 | .getImageDescriptor(PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3003)); |
434 | entry.setLargeIcon(entry.getSmallIcon()); |
435 | return entry; |
436 | } |
437 | |
438 | /** |
439 | * @generated |
440 | */ |
441 | private ToolEntry createSynchronisationPoint6CreationTool() { |
442 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
443 | types.add(PalladioComponentModelElementTypes.SynchronisationPoint_3038); |
444 | NodeToolEntry entry = new NodeToolEntry( |
445 | Messages.SynchronisationPoint6CreationTool_title, |
446 | Messages.SynchronisationPoint6CreationTool_desc, types); |
447 | entry.setId("createSynchronisationPoint6CreationTool"); //$NON-NLS-1$ |
448 | entry |
449 | .setSmallIcon(PalladioComponentModelElementTypes |
450 | .getImageDescriptor(PalladioComponentModelElementTypes.SynchronisationPoint_3038)); |
451 | entry.setLargeIcon(entry.getSmallIcon()); |
452 | return entry; |
453 | } |
454 | |
455 | /** |
456 | * @generated |
457 | */ |
458 | private ToolEntry createProbabilisticBranchTransition7CreationTool() { |
459 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
460 | types |
461 | .add(PalladioComponentModelElementTypes.ProbabilisticBranchTransition_3010); |
462 | NodeToolEntry entry = new NodeToolEntry( |
463 | Messages.ProbabilisticBranchTransition7CreationTool_title, |
464 | Messages.ProbabilisticBranchTransition7CreationTool_desc, types); |
465 | entry.setId("createProbabilisticBranchTransition7CreationTool"); //$NON-NLS-1$ |
466 | entry |
467 | .setSmallIcon(PalladioComponentModelElementTypes |
468 | .getImageDescriptor(PalladioComponentModelElementTypes.ProbabilisticBranchTransition_3010)); |
469 | entry.setLargeIcon(entry.getSmallIcon()); |
470 | return entry; |
471 | } |
472 | |
473 | /** |
474 | * @generated |
475 | */ |
476 | private ToolEntry createGuardedBranchTransition8CreationTool() { |
477 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
478 | types |
479 | .add(PalladioComponentModelElementTypes.GuardedBranchTransition_3017); |
480 | NodeToolEntry entry = new NodeToolEntry( |
481 | Messages.GuardedBranchTransition8CreationTool_title, |
482 | Messages.GuardedBranchTransition8CreationTool_desc, types); |
483 | entry.setId("createGuardedBranchTransition8CreationTool"); //$NON-NLS-1$ |
484 | entry |
485 | .setSmallIcon(PalladioComponentModelElementTypes |
486 | .getImageDescriptor(PalladioComponentModelElementTypes.GuardedBranchTransition_3017)); |
487 | entry.setLargeIcon(entry.getSmallIcon()); |
488 | return entry; |
489 | } |
490 | |
491 | /** |
492 | * @generated |
493 | */ |
494 | private ToolEntry createRecoveryActionBehaviour9CreationTool() { |
495 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
496 | types |
497 | .add(PalladioComponentModelElementTypes.RecoveryActionBehaviour_3058); |
498 | NodeToolEntry entry = new NodeToolEntry( |
499 | Messages.RecoveryActionBehaviour9CreationTool_title, |
500 | Messages.RecoveryActionBehaviour9CreationTool_desc, types); |
501 | entry.setId("createRecoveryActionBehaviour9CreationTool"); //$NON-NLS-1$ |
502 | entry |
503 | .setSmallIcon(PalladioComponentModelElementTypes |
504 | .getImageDescriptor(PalladioComponentModelElementTypes.RecoveryActionBehaviour_3058)); |
505 | entry.setLargeIcon(entry.getSmallIcon()); |
506 | return entry; |
507 | } |
508 | |
509 | /** |
510 | * @generated |
511 | */ |
512 | private ToolEntry createInfrastructureCall10CreationTool() { |
513 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
514 | types.add(PalladioComponentModelElementTypes.InfrastructureCall_3053); |
515 | NodeToolEntry entry = new NodeToolEntry( |
516 | Messages.InfrastructureCall10CreationTool_title, |
517 | Messages.InfrastructureCall10CreationTool_desc, types); |
518 | entry.setId("createInfrastructureCall10CreationTool"); //$NON-NLS-1$ |
519 | entry |
520 | .setSmallIcon(PalladioComponentModelElementTypes |
521 | .getImageDescriptor(PalladioComponentModelElementTypes.InfrastructureCall_3053)); |
522 | entry.setLargeIcon(entry.getSmallIcon()); |
523 | return entry; |
524 | } |
525 | |
526 | /** |
527 | * @generated |
528 | */ |
529 | private ToolEntry createControlFlow1CreationTool() { |
530 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
531 | types |
532 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
533 | LinkToolEntry entry = new LinkToolEntry( |
534 | Messages.ControlFlow1CreationTool_title, |
535 | Messages.ControlFlow1CreationTool_desc, types); |
536 | entry.setId("createControlFlow1CreationTool"); //$NON-NLS-1$ |
537 | entry |
538 | .setSmallIcon(PalladioComponentModelSeffDiagramEditorPlugin |
539 | .findImageDescriptor("/de.uka.ipd.sdq.pcm.edit/icons/full/ctool16/ControlFlow.gif")); //$NON-NLS-1$ |
540 | entry.setLargeIcon(entry.getSmallIcon()); |
541 | return entry; |
542 | } |
543 | |
544 | /** |
545 | * @generated |
546 | */ |
547 | private ToolEntry createRecoveryFlow2CreationTool() { |
548 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
549 | types |
550 | .add(PalladioComponentModelElementTypes.RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004); |
551 | LinkToolEntry entry = new LinkToolEntry( |
552 | Messages.RecoveryFlow2CreationTool_title, |
553 | Messages.RecoveryFlow2CreationTool_desc, types); |
554 | entry.setId("createRecoveryFlow2CreationTool"); //$NON-NLS-1$ |
555 | entry |
556 | .setSmallIcon(PalladioComponentModelSeffDiagramEditorPlugin |
557 | .findImageDescriptor("/de.uka.ipd.sdq.pcm.edit/icons/full/ctool16/RecoveryFlow.gif")); //$NON-NLS-1$ |
558 | entry.setLargeIcon(entry.getSmallIcon()); |
559 | return entry; |
560 | } |
561 | |
562 | /** |
563 | * @generated |
564 | */ |
565 | private static class NodeToolEntry extends ToolEntry { |
566 | |
567 | /** |
568 | * @generated |
569 | */ |
570 | private final List elementTypes; |
571 | |
572 | /** |
573 | * @generated |
574 | */ |
575 | private NodeToolEntry(String title, String description, |
576 | List elementTypes) { |
577 | super(title, description, null, null); |
578 | this.elementTypes = elementTypes; |
579 | } |
580 | |
581 | /** |
582 | * @generated |
583 | */ |
584 | public Tool createTool() { |
585 | Tool tool = new UnspecifiedTypeCreationTool(elementTypes); |
586 | tool.setProperties(getToolProperties()); |
587 | return tool; |
588 | } |
589 | } |
590 | |
591 | /** |
592 | * @generated |
593 | */ |
594 | private static class LinkToolEntry extends ToolEntry { |
595 | |
596 | /** |
597 | * @generated |
598 | */ |
599 | private final List relationshipTypes; |
600 | |
601 | /** |
602 | * @generated |
603 | */ |
604 | private LinkToolEntry(String title, String description, |
605 | List relationshipTypes) { |
606 | super(title, description, null, null); |
607 | this.relationshipTypes = relationshipTypes; |
608 | } |
609 | |
610 | /** |
611 | * @generated |
612 | */ |
613 | public Tool createTool() { |
614 | Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes); |
615 | tool.setProperties(getToolProperties()); |
616 | return tool; |
617 | } |
618 | } |
619 | } |