1 | /* |
2 | * Copyright 2007, IPD, SDQ, University of Karlsruhe |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.repository.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.repository.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(createBasicModelElements1Group()); |
29 | paletteRoot.add(createInternalElements2Group()); |
30 | paletteRoot.add(createComponentTypes3Group()); |
31 | paletteRoot.add(createEventBasedCommunication4Group()); |
32 | } |
33 | |
34 | /** |
35 | * Creates "Basic Model Elements" palette tool group |
36 | * @generated |
37 | */ |
38 | private PaletteContainer createBasicModelElements1Group() { |
39 | PaletteDrawer paletteContainer = new PaletteDrawer( |
40 | Messages.BasicModelElements1Group_title); |
41 | paletteContainer.setId("createBasicModelElements1Group"); //$NON-NLS-1$ |
42 | paletteContainer.setDescription(Messages.BasicModelElements1Group_desc); |
43 | paletteContainer.add(createInterface1CreationTool()); |
44 | paletteContainer.add(createBasicComponent2CreationTool()); |
45 | paletteContainer.add(createCompositeComponent3CreationTool()); |
46 | paletteContainer.add(createRequiredRole4CreationTool()); |
47 | paletteContainer.add(createProvidedRole5CreationTool()); |
48 | paletteContainer.add(createSubSystem6CreationTool()); |
49 | paletteContainer.add(createInfrastructureProvidedRole7CreationTool()); |
50 | paletteContainer.add(createInfrastructureRequiredRole8CreationTool()); |
51 | paletteContainer.add(createInfrastructureInterface9CreationTool()); |
52 | return paletteContainer; |
53 | } |
54 | |
55 | /** |
56 | * Creates "Internal Elements" palette tool group |
57 | * @generated |
58 | */ |
59 | private PaletteContainer createInternalElements2Group() { |
60 | PaletteDrawer paletteContainer = new PaletteDrawer( |
61 | Messages.InternalElements2Group_title); |
62 | paletteContainer.setId("createInternalElements2Group"); //$NON-NLS-1$ |
63 | paletteContainer.setDescription(Messages.InternalElements2Group_desc); |
64 | paletteContainer.add(createSignature1CreationTool()); |
65 | paletteContainer.add(createSEFF2CreationTool()); |
66 | paletteContainer.add(createPassiveResource3CreationTool()); |
67 | paletteContainer.add(createComponentParameter4CreationTool()); |
68 | paletteContainer.add(createVariableCharacterisation5CreationTool()); |
69 | return paletteContainer; |
70 | } |
71 | |
72 | /** |
73 | * Creates "Component Types" palette tool group |
74 | * @generated |
75 | */ |
76 | private PaletteContainer createComponentTypes3Group() { |
77 | PaletteDrawer paletteContainer = new PaletteDrawer( |
78 | Messages.ComponentTypes3Group_title); |
79 | paletteContainer.setId("createComponentTypes3Group"); //$NON-NLS-1$ |
80 | paletteContainer.setDescription(Messages.ComponentTypes3Group_desc); |
81 | paletteContainer.add(createProvidesComponentType1CreationTool()); |
82 | paletteContainer.add(createCompleteComponentType2CreationTool()); |
83 | paletteContainer.add(createConformsProvidedType3CreationTool()); |
84 | paletteContainer.add(createConformsCompleteType4CreationTool()); |
85 | return paletteContainer; |
86 | } |
87 | |
88 | /** |
89 | * Creates "Event-Based Communication" palette tool group |
90 | * @generated |
91 | */ |
92 | private PaletteContainer createEventBasedCommunication4Group() { |
93 | PaletteDrawer paletteContainer = new PaletteDrawer( |
94 | Messages.EventBasedCommunication4Group_title); |
95 | paletteContainer.setId("createEventBasedCommunication4Group"); //$NON-NLS-1$ |
96 | paletteContainer |
97 | .setDescription(Messages.EventBasedCommunication4Group_desc); |
98 | paletteContainer.add(createEventGroup1CreationTool()); |
99 | paletteContainer.add(createEventType2CreationTool()); |
100 | paletteContainer.add(createSourceRole3CreationTool()); |
101 | paletteContainer.add(createSinkRole4CreationTool()); |
102 | return paletteContainer; |
103 | } |
104 | |
105 | /** |
106 | * @generated |
107 | */ |
108 | private ToolEntry createInterface1CreationTool() { |
109 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
110 | types.add(PalladioComponentModelElementTypes.OperationInterface_2107); |
111 | NodeToolEntry entry = new NodeToolEntry( |
112 | Messages.Interface1CreationTool_title, |
113 | Messages.Interface1CreationTool_desc, types); |
114 | entry.setId("createInterface1CreationTool"); //$NON-NLS-1$ |
115 | entry |
116 | .setSmallIcon(PalladioComponentModelElementTypes |
117 | .getImageDescriptor(PalladioComponentModelElementTypes.OperationInterface_2107)); |
118 | entry.setLargeIcon(entry.getSmallIcon()); |
119 | return entry; |
120 | } |
121 | |
122 | /** |
123 | * @generated |
124 | */ |
125 | private ToolEntry createBasicComponent2CreationTool() { |
126 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
127 | types.add(PalladioComponentModelElementTypes.BasicComponent_2102); |
128 | NodeToolEntry entry = new NodeToolEntry( |
129 | Messages.BasicComponent2CreationTool_title, |
130 | Messages.BasicComponent2CreationTool_desc, types); |
131 | entry.setId("createBasicComponent2CreationTool"); //$NON-NLS-1$ |
132 | entry |
133 | .setSmallIcon(PalladioComponentModelElementTypes |
134 | .getImageDescriptor(PalladioComponentModelElementTypes.BasicComponent_2102)); |
135 | entry.setLargeIcon(entry.getSmallIcon()); |
136 | return entry; |
137 | } |
138 | |
139 | /** |
140 | * @generated |
141 | */ |
142 | private ToolEntry createCompositeComponent3CreationTool() { |
143 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
144 | types.add(PalladioComponentModelElementTypes.CompositeComponent_2103); |
145 | NodeToolEntry entry = new NodeToolEntry( |
146 | Messages.CompositeComponent3CreationTool_title, |
147 | Messages.CompositeComponent3CreationTool_desc, types); |
148 | entry.setId("createCompositeComponent3CreationTool"); //$NON-NLS-1$ |
149 | entry |
150 | .setSmallIcon(PalladioComponentModelElementTypes |
151 | .getImageDescriptor(PalladioComponentModelElementTypes.CompositeComponent_2103)); |
152 | entry.setLargeIcon(entry.getSmallIcon()); |
153 | return entry; |
154 | } |
155 | |
156 | /** |
157 | * @generated |
158 | */ |
159 | private ToolEntry createRequiredRole4CreationTool() { |
160 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
161 | types |
162 | .add(PalladioComponentModelElementTypes.OperationRequiredRole_4106); |
163 | LinkToolEntry entry = new LinkToolEntry( |
164 | Messages.RequiredRole4CreationTool_title, |
165 | Messages.RequiredRole4CreationTool_desc, types); |
166 | entry.setId("createRequiredRole4CreationTool"); //$NON-NLS-1$ |
167 | entry |
168 | .setSmallIcon(PalladioComponentModelElementTypes |
169 | .getImageDescriptor(PalladioComponentModelElementTypes.OperationRequiredRole_4106)); |
170 | entry.setLargeIcon(entry.getSmallIcon()); |
171 | return entry; |
172 | } |
173 | |
174 | /** |
175 | * @generated |
176 | */ |
177 | private ToolEntry createProvidedRole5CreationTool() { |
178 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
179 | types |
180 | .add(PalladioComponentModelElementTypes.OperationProvidedRole_4105); |
181 | LinkToolEntry entry = new LinkToolEntry( |
182 | Messages.ProvidedRole5CreationTool_title, |
183 | Messages.ProvidedRole5CreationTool_desc, types); |
184 | entry.setId("createProvidedRole5CreationTool"); //$NON-NLS-1$ |
185 | entry |
186 | .setSmallIcon(PalladioComponentModelElementTypes |
187 | .getImageDescriptor(PalladioComponentModelElementTypes.OperationProvidedRole_4105)); |
188 | entry.setLargeIcon(entry.getSmallIcon()); |
189 | return entry; |
190 | } |
191 | |
192 | /** |
193 | * @generated |
194 | */ |
195 | private ToolEntry createSubSystem6CreationTool() { |
196 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
197 | types.add(PalladioComponentModelElementTypes.SubSystem_2106); |
198 | NodeToolEntry entry = new NodeToolEntry( |
199 | Messages.SubSystem6CreationTool_title, |
200 | Messages.SubSystem6CreationTool_desc, types); |
201 | entry.setId("createSubSystem6CreationTool"); //$NON-NLS-1$ |
202 | entry |
203 | .setSmallIcon(PalladioComponentModelElementTypes |
204 | .getImageDescriptor(PalladioComponentModelElementTypes.SubSystem_2106)); |
205 | entry.setLargeIcon(entry.getSmallIcon()); |
206 | return entry; |
207 | } |
208 | |
209 | /** |
210 | * @generated |
211 | */ |
212 | private ToolEntry createInfrastructureProvidedRole7CreationTool() { |
213 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
214 | types |
215 | .add(PalladioComponentModelElementTypes.InfrastructureProvidedRole_4111); |
216 | LinkToolEntry entry = new LinkToolEntry( |
217 | Messages.InfrastructureProvidedRole7CreationTool_title, |
218 | Messages.InfrastructureProvidedRole7CreationTool_desc, types); |
219 | entry.setId("createInfrastructureProvidedRole7CreationTool"); //$NON-NLS-1$ |
220 | entry |
221 | .setSmallIcon(PalladioComponentModelElementTypes |
222 | .getImageDescriptor(PalladioComponentModelElementTypes.InfrastructureProvidedRole_4111)); |
223 | entry.setLargeIcon(entry.getSmallIcon()); |
224 | return entry; |
225 | } |
226 | |
227 | /** |
228 | * @generated |
229 | */ |
230 | private ToolEntry createInfrastructureRequiredRole8CreationTool() { |
231 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
232 | types |
233 | .add(PalladioComponentModelElementTypes.InfrastructureRequiredRole_4112); |
234 | LinkToolEntry entry = new LinkToolEntry( |
235 | Messages.InfrastructureRequiredRole8CreationTool_title, |
236 | Messages.InfrastructureRequiredRole8CreationTool_desc, types); |
237 | entry.setId("createInfrastructureRequiredRole8CreationTool"); //$NON-NLS-1$ |
238 | entry |
239 | .setSmallIcon(PalladioComponentModelElementTypes |
240 | .getImageDescriptor(PalladioComponentModelElementTypes.InfrastructureRequiredRole_4112)); |
241 | entry.setLargeIcon(entry.getSmallIcon()); |
242 | return entry; |
243 | } |
244 | |
245 | /** |
246 | * @generated |
247 | */ |
248 | private ToolEntry createInfrastructureInterface9CreationTool() { |
249 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
250 | types |
251 | .add(PalladioComponentModelElementTypes.InfrastructureInterface_2109); |
252 | NodeToolEntry entry = new NodeToolEntry( |
253 | Messages.InfrastructureInterface9CreationTool_title, |
254 | Messages.InfrastructureInterface9CreationTool_desc, types); |
255 | entry.setId("createInfrastructureInterface9CreationTool"); //$NON-NLS-1$ |
256 | entry |
257 | .setSmallIcon(PalladioComponentModelElementTypes |
258 | .getImageDescriptor(PalladioComponentModelElementTypes.InfrastructureInterface_2109)); |
259 | entry.setLargeIcon(entry.getSmallIcon()); |
260 | return entry; |
261 | } |
262 | |
263 | /** |
264 | * @generated |
265 | */ |
266 | private ToolEntry createSignature1CreationTool() { |
267 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2); |
268 | types.add(PalladioComponentModelElementTypes.OperationSignature_3106); |
269 | types |
270 | .add(PalladioComponentModelElementTypes.InfrastructureSignature_3108); |
271 | NodeToolEntry entry = new NodeToolEntry( |
272 | Messages.Signature1CreationTool_title, |
273 | Messages.Signature1CreationTool_desc, types); |
274 | entry.setId("createSignature1CreationTool"); //$NON-NLS-1$ |
275 | entry |
276 | .setSmallIcon(PalladioComponentModelElementTypes |
277 | .getImageDescriptor(PalladioComponentModelElementTypes.OperationSignature_3106)); |
278 | entry.setLargeIcon(entry.getSmallIcon()); |
279 | return entry; |
280 | } |
281 | |
282 | /** |
283 | * @generated |
284 | */ |
285 | private ToolEntry createSEFF2CreationTool() { |
286 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
287 | types |
288 | .add(PalladioComponentModelElementTypes.ResourceDemandingSEFF_3102); |
289 | NodeToolEntry entry = new NodeToolEntry( |
290 | Messages.SEFF2CreationTool_title, |
291 | Messages.SEFF2CreationTool_desc, types); |
292 | entry.setId("createSEFF2CreationTool"); //$NON-NLS-1$ |
293 | entry |
294 | .setSmallIcon(PalladioComponentModelElementTypes |
295 | .getImageDescriptor(PalladioComponentModelElementTypes.ResourceDemandingSEFF_3102)); |
296 | entry.setLargeIcon(entry.getSmallIcon()); |
297 | return entry; |
298 | } |
299 | |
300 | /** |
301 | * @generated |
302 | */ |
303 | private ToolEntry createPassiveResource3CreationTool() { |
304 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
305 | types.add(PalladioComponentModelElementTypes.PassiveResource_3103); |
306 | NodeToolEntry entry = new NodeToolEntry( |
307 | Messages.PassiveResource3CreationTool_title, |
308 | Messages.PassiveResource3CreationTool_desc, types); |
309 | entry.setId("createPassiveResource3CreationTool"); //$NON-NLS-1$ |
310 | entry |
311 | .setSmallIcon(PalladioComponentModelElementTypes |
312 | .getImageDescriptor(PalladioComponentModelElementTypes.PassiveResource_3103)); |
313 | entry.setLargeIcon(entry.getSmallIcon()); |
314 | return entry; |
315 | } |
316 | |
317 | /** |
318 | * @generated |
319 | */ |
320 | private ToolEntry createComponentParameter4CreationTool() { |
321 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
322 | types.add(PalladioComponentModelElementTypes.VariableUsage_3104); |
323 | NodeToolEntry entry = new NodeToolEntry( |
324 | Messages.ComponentParameter4CreationTool_title, |
325 | Messages.ComponentParameter4CreationTool_desc, types); |
326 | entry.setId("createComponentParameter4CreationTool"); //$NON-NLS-1$ |
327 | entry |
328 | .setSmallIcon(PalladioComponentModelElementTypes |
329 | .getImageDescriptor(PalladioComponentModelElementTypes.VariableUsage_3104)); |
330 | entry.setLargeIcon(entry.getSmallIcon()); |
331 | return entry; |
332 | } |
333 | |
334 | /** |
335 | * @generated |
336 | */ |
337 | private ToolEntry createVariableCharacterisation5CreationTool() { |
338 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
339 | types |
340 | .add(PalladioComponentModelElementTypes.VariableCharacterisation_3105); |
341 | NodeToolEntry entry = new NodeToolEntry( |
342 | Messages.VariableCharacterisation5CreationTool_title, |
343 | Messages.VariableCharacterisation5CreationTool_desc, types); |
344 | entry.setId("createVariableCharacterisation5CreationTool"); //$NON-NLS-1$ |
345 | entry |
346 | .setSmallIcon(PalladioComponentModelElementTypes |
347 | .getImageDescriptor(PalladioComponentModelElementTypes.VariableCharacterisation_3105)); |
348 | entry.setLargeIcon(entry.getSmallIcon()); |
349 | return entry; |
350 | } |
351 | |
352 | /** |
353 | * @generated |
354 | */ |
355 | private ToolEntry createProvidesComponentType1CreationTool() { |
356 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
357 | types |
358 | .add(PalladioComponentModelElementTypes.ProvidesComponentType_2105); |
359 | NodeToolEntry entry = new NodeToolEntry( |
360 | Messages.ProvidesComponentType1CreationTool_title, |
361 | Messages.ProvidesComponentType1CreationTool_desc, types); |
362 | entry.setId("createProvidesComponentType1CreationTool"); //$NON-NLS-1$ |
363 | entry |
364 | .setSmallIcon(PalladioComponentModelElementTypes |
365 | .getImageDescriptor(PalladioComponentModelElementTypes.ProvidesComponentType_2105)); |
366 | entry.setLargeIcon(entry.getSmallIcon()); |
367 | return entry; |
368 | } |
369 | |
370 | /** |
371 | * @generated |
372 | */ |
373 | private ToolEntry createCompleteComponentType2CreationTool() { |
374 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
375 | types |
376 | .add(PalladioComponentModelElementTypes.CompleteComponentType_2104); |
377 | NodeToolEntry entry = new NodeToolEntry( |
378 | Messages.CompleteComponentType2CreationTool_title, |
379 | Messages.CompleteComponentType2CreationTool_desc, types); |
380 | entry.setId("createCompleteComponentType2CreationTool"); //$NON-NLS-1$ |
381 | entry |
382 | .setSmallIcon(PalladioComponentModelElementTypes |
383 | .getImageDescriptor(PalladioComponentModelElementTypes.CompleteComponentType_2104)); |
384 | entry.setLargeIcon(entry.getSmallIcon()); |
385 | return entry; |
386 | } |
387 | |
388 | /** |
389 | * @generated |
390 | */ |
391 | private ToolEntry createConformsProvidedType3CreationTool() { |
392 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
393 | types |
394 | .add(PalladioComponentModelElementTypes.CompleteComponentTypeParentProvidesComponentTypes_4104); |
395 | LinkToolEntry entry = new LinkToolEntry( |
396 | Messages.ConformsProvidedType3CreationTool_title, |
397 | Messages.ConformsProvidedType3CreationTool_desc, types); |
398 | entry.setId("createConformsProvidedType3CreationTool"); //$NON-NLS-1$ |
399 | entry |
400 | .setSmallIcon(PalladioComponentModelElementTypes |
401 | .getImageDescriptor(PalladioComponentModelElementTypes.CompleteComponentTypeParentProvidesComponentTypes_4104)); |
402 | entry.setLargeIcon(entry.getSmallIcon()); |
403 | return entry; |
404 | } |
405 | |
406 | /** |
407 | * @generated |
408 | */ |
409 | private ToolEntry createConformsCompleteType4CreationTool() { |
410 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
411 | types |
412 | .add(PalladioComponentModelElementTypes.ImplementationComponentTypeParentCompleteComponentTypes_4103); |
413 | LinkToolEntry entry = new LinkToolEntry( |
414 | Messages.ConformsCompleteType4CreationTool_title, |
415 | Messages.ConformsCompleteType4CreationTool_desc, types); |
416 | entry.setId("createConformsCompleteType4CreationTool"); //$NON-NLS-1$ |
417 | entry |
418 | .setSmallIcon(PalladioComponentModelElementTypes |
419 | .getImageDescriptor(PalladioComponentModelElementTypes.ImplementationComponentTypeParentCompleteComponentTypes_4103)); |
420 | entry.setLargeIcon(entry.getSmallIcon()); |
421 | return entry; |
422 | } |
423 | |
424 | /** |
425 | * @generated |
426 | */ |
427 | private ToolEntry createEventGroup1CreationTool() { |
428 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
429 | types.add(PalladioComponentModelElementTypes.EventGroup_2108); |
430 | NodeToolEntry entry = new NodeToolEntry( |
431 | Messages.EventGroup1CreationTool_title, |
432 | Messages.EventGroup1CreationTool_desc, types); |
433 | entry.setId("createEventGroup1CreationTool"); //$NON-NLS-1$ |
434 | entry |
435 | .setSmallIcon(PalladioComponentModelElementTypes |
436 | .getImageDescriptor(PalladioComponentModelElementTypes.EventGroup_2108)); |
437 | entry.setLargeIcon(entry.getSmallIcon()); |
438 | return entry; |
439 | } |
440 | |
441 | /** |
442 | * @generated |
443 | */ |
444 | private ToolEntry createEventType2CreationTool() { |
445 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
446 | types.add(PalladioComponentModelElementTypes.EventType_3107); |
447 | NodeToolEntry entry = new NodeToolEntry( |
448 | Messages.EventType2CreationTool_title, |
449 | Messages.EventType2CreationTool_desc, types); |
450 | entry.setId("createEventType2CreationTool"); //$NON-NLS-1$ |
451 | entry |
452 | .setSmallIcon(PalladioComponentModelElementTypes |
453 | .getImageDescriptor(PalladioComponentModelElementTypes.EventType_3107)); |
454 | entry.setLargeIcon(entry.getSmallIcon()); |
455 | return entry; |
456 | } |
457 | |
458 | /** |
459 | * @generated |
460 | */ |
461 | private ToolEntry createSourceRole3CreationTool() { |
462 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
463 | types.add(PalladioComponentModelElementTypes.SourceRole_4110); |
464 | LinkToolEntry entry = new LinkToolEntry( |
465 | Messages.SourceRole3CreationTool_title, |
466 | Messages.SourceRole3CreationTool_desc, types); |
467 | entry.setId("createSourceRole3CreationTool"); //$NON-NLS-1$ |
468 | entry |
469 | .setSmallIcon(PalladioComponentModelElementTypes |
470 | .getImageDescriptor(PalladioComponentModelElementTypes.SourceRole_4110)); |
471 | entry.setLargeIcon(entry.getSmallIcon()); |
472 | return entry; |
473 | } |
474 | |
475 | /** |
476 | * @generated |
477 | */ |
478 | private ToolEntry createSinkRole4CreationTool() { |
479 | List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1); |
480 | types.add(PalladioComponentModelElementTypes.SinkRole_4109); |
481 | LinkToolEntry entry = new LinkToolEntry( |
482 | Messages.SinkRole4CreationTool_title, |
483 | Messages.SinkRole4CreationTool_desc, types); |
484 | entry.setId("createSinkRole4CreationTool"); //$NON-NLS-1$ |
485 | entry |
486 | .setSmallIcon(PalladioComponentModelElementTypes |
487 | .getImageDescriptor(PalladioComponentModelElementTypes.SinkRole_4109)); |
488 | entry.setLargeIcon(entry.getSmallIcon()); |
489 | return entry; |
490 | } |
491 | |
492 | /** |
493 | * @generated |
494 | */ |
495 | private static class NodeToolEntry extends ToolEntry { |
496 | |
497 | /** |
498 | * @generated |
499 | */ |
500 | private final List elementTypes; |
501 | |
502 | /** |
503 | * @generated |
504 | */ |
505 | private NodeToolEntry(String title, String description, |
506 | List elementTypes) { |
507 | super(title, description, null, null); |
508 | this.elementTypes = elementTypes; |
509 | } |
510 | |
511 | /** |
512 | * @generated |
513 | */ |
514 | public Tool createTool() { |
515 | Tool tool = new UnspecifiedTypeCreationTool(elementTypes); |
516 | tool.setProperties(getToolProperties()); |
517 | return tool; |
518 | } |
519 | } |
520 | |
521 | /** |
522 | * @generated |
523 | */ |
524 | private static class LinkToolEntry extends ToolEntry { |
525 | |
526 | /** |
527 | * @generated |
528 | */ |
529 | private final List relationshipTypes; |
530 | |
531 | /** |
532 | * @generated |
533 | */ |
534 | private LinkToolEntry(String title, String description, |
535 | List relationshipTypes) { |
536 | super(title, description, null, null); |
537 | this.relationshipTypes = relationshipTypes; |
538 | } |
539 | |
540 | /** |
541 | * @generated |
542 | */ |
543 | public Tool createTool() { |
544 | Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes); |
545 | tool.setProperties(getToolProperties()); |
546 | return tool; |
547 | } |
548 | } |
549 | } |