EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.gmf.seff.providers]

COVERAGE SUMMARY FOR SOURCE FILE [PalladioComponentModelElementTypes.java]

nameclass, %method, %block, %line, %
PalladioComponentModelElementTypes.java0%   (0/1)0%   (0/13)0%   (0/944)0%   (0/341)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PalladioComponentModelElementTypes0%   (0/1)0%   (0/13)0%   (0/944)0%   (0/341)
<static initializer> 0%   (0/1)0%   (0/157)0%   (0/53)
PalladioComponentModelElementTypes (): void 0%   (0/1)0%   (0/3)0%   (0/2)
getElement (IAdaptable): ENamedElement 0%   (0/1)0%   (0/327)0%   (0/128)
getElementType (String): IElementType 0%   (0/1)0%   (0/4)0%   (0/1)
getElementType (int): IElementType 0%   (0/1)0%   (0/108)0%   (0/54)
getImage (ENamedElement): Image 0%   (0/1)0%   (0/26)0%   (0/9)
getImage (IAdaptable): Image 0%   (0/1)0%   (0/10)0%   (0/4)
getImageDescriptor (ENamedElement): ImageDescriptor 0%   (0/1)0%   (0/22)0%   (0/8)
getImageDescriptor (IAdaptable): ImageDescriptor 0%   (0/1)0%   (0/10)0%   (0/4)
getImageRegistry (): ImageRegistry 0%   (0/1)0%   (0/8)0%   (0/3)
getImageRegistryKey (ENamedElement): String 0%   (0/1)0%   (0/3)0%   (0/1)
getProvidedImageDescriptor (ENamedElement): ImageDescriptor 0%   (0/1)0%   (0/48)0%   (0/17)
isKnownElementType (IElementType): boolean 0%   (0/1)0%   (0/218)0%   (0/57)

1/*
2 * Copyright 2006 SDQ Research Group, University of Karlsruhe (TH)
3 */
4package de.uka.ipd.sdq.pcm.gmf.seff.providers;
5 
6import java.util.HashSet;
7import java.util.IdentityHashMap;
8import java.util.Map;
9import java.util.Set;
10 
11import org.eclipse.core.runtime.IAdaptable;
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.EClassifier;
14import org.eclipse.emf.ecore.ENamedElement;
15import org.eclipse.emf.ecore.EStructuralFeature;
16import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
17import org.eclipse.gmf.runtime.emf.type.core.IElementType;
18import org.eclipse.jface.resource.ImageDescriptor;
19import org.eclipse.jface.resource.ImageRegistry;
20import org.eclipse.swt.graphics.Image;
21 
22import de.uka.ipd.sdq.pcm.core.CorePackage;
23import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.AbstractActionSuccessor_AbstractActionEditPart;
24import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.AcquireAction2EditPart;
25import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.AcquireActionEditPart;
26import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.BranchAction2EditPart;
27import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.BranchActionEditPart;
28import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.CollectionIteratorAction2EditPart;
29import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.CollectionIteratorActionEditPart;
30import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.EmitEventAction2EditPart;
31import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.EmitEventActionEditPart;
32import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ExternalCallAction2EditPart;
33import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ExternalCallActionEditPart;
34import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ForkAction2EditPart;
35import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ForkActionEditPart;
36import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ForkedBehaviour2EditPart;
37import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ForkedBehaviourEditPart;
38import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.GuardedBranchTransitionEditPart;
39import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.InfrastructureCallEditPart;
40import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.InternalAction2EditPart;
41import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.InternalActionEditPart;
42import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.InternalFailureOccurrenceDescriptionEditPart;
43import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.LoopAction2EditPart;
44import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.LoopActionEditPart;
45import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ParametricResourceDemandEditPart;
46import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ProbabilisticBranchTransitionEditPart;
47import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.RecoveryAction2EditPart;
48import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.RecoveryActionBehaviourEditPart;
49import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviourEditPart;
50import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.RecoveryActionEditPart;
51import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ReleaseAction2EditPart;
52import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ReleaseActionEditPart;
53import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ResourceDemandingBehaviour2EditPart;
54import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ResourceDemandingBehaviour3EditPart;
55import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ResourceDemandingBehaviour4EditPart;
56import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ResourceDemandingBehaviourEditPart;
57import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.ResourceDemandingSEFFEditPart;
58import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.SetVariableAction2EditPart;
59import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.SetVariableActionEditPart;
60import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StartAction2EditPart;
61import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StartActionEditPart;
62import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StopAction2EditPart;
63import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.StopActionEditPart;
64import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.SynchronisationPointEditPart;
65import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableCharacterisation2EditPart;
66import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableCharacterisation3EditPart;
67import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableCharacterisation4EditPart;
68import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableCharacterisation5EditPart;
69import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableCharacterisationEditPart;
70import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableUsage2EditPart;
71import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableUsage3EditPart;
72import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableUsage4EditPart;
73import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableUsage5EditPart;
74import de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.VariableUsageEditPart;
75import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelSeffDiagramEditorPlugin;
76import de.uka.ipd.sdq.pcm.parameter.ParameterPackage;
77import de.uka.ipd.sdq.pcm.reliability.ReliabilityPackage;
78import de.uka.ipd.sdq.pcm.seff.SeffPackage;
79 
80/**
81 * @generated
82 */
83public class PalladioComponentModelElementTypes extends ElementInitializers {
84 
85        /**
86         * @generated
87         */
88        private PalladioComponentModelElementTypes() {
89        }
90 
91        /**
92         * @generated
93         */
94        private static Map elements;
95 
96        /**
97         * @generated
98         */
99        private static ImageRegistry imageRegistry;
100 
101        /**
102         * @generated
103         */
104        private static Set KNOWN_ELEMENT_TYPES;
105 
106        /**
107         * @generated
108         */
109        public static final IElementType ResourceDemandingSEFF_1000 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ResourceDemandingSEFF_1000"); //$NON-NLS-1$
110        /**
111         * @generated
112         */
113        public static final IElementType StartAction_2001 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.StartAction_2001"); //$NON-NLS-1$
114        /**
115         * @generated
116         */
117        public static final IElementType StopAction_2002 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.StopAction_2002"); //$NON-NLS-1$
118        /**
119         * @generated
120         */
121        public static final IElementType ExternalCallAction_2003 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ExternalCallAction_2003"); //$NON-NLS-1$
122        /**
123         * @generated
124         */
125        public static final IElementType EmitEventAction_2013 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.EmitEventAction_2013"); //$NON-NLS-1$
126 
127        /**
128         * @generated
129         */
130        public static final IElementType LoopAction_2004 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.LoopAction_2004"); //$NON-NLS-1$
131        /**
132         * @generated
133         */
134        public static final IElementType BranchAction_2005 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.BranchAction_2005"); //$NON-NLS-1$
135        /**
136         * @generated
137         */
138        public static final IElementType InternalAction_2006 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.InternalAction_2006"); //$NON-NLS-1$
139        /**
140         * @generated
141         */
142        public static final IElementType CollectionIteratorAction_2007 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.CollectionIteratorAction_2007"); //$NON-NLS-1$
143 
144        /**
145         * @generated
146         */
147        public static final IElementType SetVariableAction_2008 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.SetVariableAction_2008"); //$NON-NLS-1$
148 
149        /**
150         * @generated
151         */
152        public static final IElementType AcquireAction_2012 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.AcquireAction_2012"); //$NON-NLS-1$
153 
154        /**
155         * @generated
156         */
157        public static final IElementType ReleaseAction_2010 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ReleaseAction_2010"); //$NON-NLS-1$
158 
159        /**
160         * @generated
161         */
162        public static final IElementType ForkAction_2011 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ForkAction_2011"); //$NON-NLS-1$
163 
164        /**
165         * @generated
166         */
167        public static final IElementType RecoveryAction_2016 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.RecoveryAction_2016"); //$NON-NLS-1$
168 
169        /**
170         * @generated
171         */
172        public static final IElementType VariableUsage_3042 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableUsage_3042"); //$NON-NLS-1$
173 
174        /**
175         * @generated
176         */
177        public static final IElementType VariableCharacterisation_3033 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableCharacterisation_3033"); //$NON-NLS-1$
178 
179        /**
180         * @generated
181         */
182        public static final IElementType VariableUsage_3049 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableUsage_3049"); //$NON-NLS-1$
183 
184        /**
185         * @generated
186         */
187        public static final IElementType VariableCharacterisation_3035 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableCharacterisation_3035"); //$NON-NLS-1$
188 
189        /**
190         * @generated
191         */
192        public static final IElementType VariableUsage_3047 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableUsage_3047"); //$NON-NLS-1$
193 
194        /**
195         * @generated
196         */
197        public static final IElementType ResourceDemandingBehaviour_3003 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ResourceDemandingBehaviour_3003"); //$NON-NLS-1$
198        /**
199         * @generated
200         */
201        public static final IElementType StartAction_3004 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.StartAction_3004"); //$NON-NLS-1$
202        /**
203         * @generated
204         */
205        public static final IElementType StopAction_3005 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.StopAction_3005"); //$NON-NLS-1$
206        /**
207         * @generated
208         */
209        public static final IElementType LoopAction_3006 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.LoopAction_3006"); //$NON-NLS-1$
210        /**
211         * @generated
212         */
213        public static final IElementType InternalAction_3007 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.InternalAction_3007"); //$NON-NLS-1$
214        /**
215         * @generated
216         */
217        public static final IElementType ParametricResourceDemand_3051 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ParametricResourceDemand_3051"); //$NON-NLS-1$
218 
219        /**
220         * @generated
221         */
222        public static final IElementType InternalFailureOccurrenceDescription_3050 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.InternalFailureOccurrenceDescription_3050"); //$NON-NLS-1$
223 
224        /**
225         * @generated
226         */
227        public static final IElementType InfrastructureCall_3053 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.InfrastructureCall_3053"); //$NON-NLS-1$
228 
229        /**
230         * @generated
231         */
232        public static final IElementType VariableUsage_3054 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableUsage_3054"); //$NON-NLS-1$
233 
234        /**
235         * @generated
236         */
237        public static final IElementType BranchAction_3009 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.BranchAction_3009"); //$NON-NLS-1$
238        /**
239         * @generated
240         */
241        public static final IElementType ProbabilisticBranchTransition_3010 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ProbabilisticBranchTransition_3010"); //$NON-NLS-1$
242        /**
243         * @generated
244         */
245        public static final IElementType ResourceDemandingBehaviour_3011 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ResourceDemandingBehaviour_3011"); //$NON-NLS-1$
246        /**
247         * @generated
248         */
249        public static final IElementType ExternalCallAction_3012 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ExternalCallAction_3012"); //$NON-NLS-1$
250        /**
251         * @generated
252         */
253        public static final IElementType EmitEventAction_3046 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.EmitEventAction_3046"); //$NON-NLS-1$
254 
255        /**
256         * @generated
257         */
258        public static final IElementType AcquireAction_3026 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.AcquireAction_3026"); //$NON-NLS-1$
259 
260        /**
261         * @generated
262         */
263        public static final IElementType ReleaseAction_3020 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ReleaseAction_3020"); //$NON-NLS-1$
264 
265        /**
266         * @generated
267         */
268        public static final IElementType ForkAction_3023 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ForkAction_3023"); //$NON-NLS-1$
269 
270        /**
271         * @generated
272         */
273        public static final IElementType ForkedBehaviour_3027 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ForkedBehaviour_3027"); //$NON-NLS-1$
274 
275        /**
276         * @generated
277         */
278        public static final IElementType GuardedBranchTransition_3017 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.GuardedBranchTransition_3017"); //$NON-NLS-1$
279 
280        /**
281         * @generated
282         */
283        public static final IElementType ResourceDemandingBehaviour_3018 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ResourceDemandingBehaviour_3018"); //$NON-NLS-1$
284 
285        /**
286         * @generated
287         */
288        public static final IElementType CollectionIteratorAction_3013 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.CollectionIteratorAction_3013"); //$NON-NLS-1$
289 
290        /**
291         * @generated
292         */
293        public static final IElementType ResourceDemandingBehaviour_3014 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ResourceDemandingBehaviour_3014"); //$NON-NLS-1$
294 
295        /**
296         * @generated
297         */
298        public static final IElementType RecoveryAction_3057 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.RecoveryAction_3057"); //$NON-NLS-1$
299 
300        /**
301         * @generated
302         */
303        public static final IElementType RecoveryActionBehaviour_3058 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.RecoveryActionBehaviour_3058"); //$NON-NLS-1$
304 
305        /**
306         * @generated
307         */
308        public static final IElementType SynchronisationPoint_3038 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.SynchronisationPoint_3038"); //$NON-NLS-1$
309 
310        /**
311         * @generated
312         */
313        public static final IElementType ForkedBehaviour_3039 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.ForkedBehaviour_3039"); //$NON-NLS-1$
314 
315        /**
316         * @generated
317         */
318        public static final IElementType SetVariableAction_3024 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.SetVariableAction_3024"); //$NON-NLS-1$
319 
320        /**
321         * @generated
322         */
323        public static final IElementType VariableUsage_3036 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableUsage_3036"); //$NON-NLS-1$
324 
325        /**
326         * @generated
327         */
328        public static final IElementType VariableCharacterisation_3055 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableCharacterisation_3055"); //$NON-NLS-1$
329 
330        /**
331         * @generated
332         */
333        public static final IElementType VariableCharacterisation_3048 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableCharacterisation_3048"); //$NON-NLS-1$
334 
335        /**
336         * @generated
337         */
338        public static final IElementType VariableCharacterisation_3037 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.VariableCharacterisation_3037"); //$NON-NLS-1$
339 
340        /**
341         * @generated
342         */
343        public static final IElementType AbstractActionSuccessor_AbstractAction_4001 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.AbstractActionSuccessor_AbstractAction_4001"); //$NON-NLS-1$
344 
345        /**
346         * @generated
347         */
348        public static final IElementType RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004 = getElementType("de.uka.ipd.sdq.pcm.gmf.seff.RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004"); //$NON-NLS-1$
349 
350        /**
351         * @generated
352         */
353        private static ImageRegistry getImageRegistry() {
354                if (imageRegistry == null) {
355                        imageRegistry = new ImageRegistry();
356                }
357                return imageRegistry;
358        }
359 
360        /**
361         * @generated
362         */
363        private static String getImageRegistryKey(ENamedElement element) {
364                return element.getName();
365        }
366 
367        /**
368         * @generated
369         */
370        private static ImageDescriptor getProvidedImageDescriptor(
371                        ENamedElement element) {
372                if (element instanceof EStructuralFeature) {
373                        EStructuralFeature feature = ((EStructuralFeature) element);
374                        EClass eContainingClass = feature.getEContainingClass();
375                        EClassifier eType = feature.getEType();
376                        if (eContainingClass != null && !eContainingClass.isAbstract()) {
377                                element = eContainingClass;
378                        } else if (eType instanceof EClass
379                                        && !((EClass) eType).isAbstract()) {
380                                element = eType;
381                        }
382                }
383                if (element instanceof EClass) {
384                        EClass eClass = (EClass) element;
385                        if (!eClass.isAbstract()) {
386                                return PalladioComponentModelSeffDiagramEditorPlugin
387                                                .getInstance().getItemImageDescriptor(
388                                                                eClass.getEPackage().getEFactoryInstance()
389                                                                                .create(eClass));
390                        }
391                }
392                // TODO : support structural features
393                return null;
394        }
395 
396        /**
397         * @generated
398         */
399        public static ImageDescriptor getImageDescriptor(ENamedElement element) {
400                String key = getImageRegistryKey(element);
401                ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
402                if (imageDescriptor == null) {
403                        imageDescriptor = getProvidedImageDescriptor(element);
404                        if (imageDescriptor == null) {
405                                imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
406                        }
407                        getImageRegistry().put(key, imageDescriptor);
408                }
409                return imageDescriptor;
410        }
411 
412        /**
413         * @generated
414         */
415        public static Image getImage(ENamedElement element) {
416                String key = getImageRegistryKey(element);
417                Image image = getImageRegistry().get(key);
418                if (image == null) {
419                        ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
420                        if (imageDescriptor == null) {
421                                imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
422                        }
423                        getImageRegistry().put(key, imageDescriptor);
424                        image = getImageRegistry().get(key);
425                }
426                return image;
427        }
428 
429        /**
430         * @generated
431         */
432        public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
433                ENamedElement element = getElement(hint);
434                if (element == null) {
435                        return null;
436                }
437                return getImageDescriptor(element);
438        }
439 
440        /**
441         * @generated
442         */
443        public static Image getImage(IAdaptable hint) {
444                ENamedElement element = getElement(hint);
445                if (element == null) {
446                        return null;
447                }
448                return getImage(element);
449        }
450 
451        /**
452         * Returns 'type' of the ecore object associated with the hint.
453         * 
454         * @generated
455         */
456        public static ENamedElement getElement(IAdaptable hint) {
457                Object type = hint.getAdapter(IElementType.class);
458                if (elements == null) {
459                        elements = new IdentityHashMap();
460 
461                        elements.put(ResourceDemandingSEFF_1000, SeffPackage.eINSTANCE
462                                        .getResourceDemandingSEFF());
463 
464                        elements.put(StartAction_2001, SeffPackage.eINSTANCE
465                                        .getStartAction());
466 
467                        elements
468                                        .put(StopAction_2002, SeffPackage.eINSTANCE.getStopAction());
469 
470                        elements.put(ExternalCallAction_2003, SeffPackage.eINSTANCE
471                                        .getExternalCallAction());
472 
473                        elements.put(EmitEventAction_2013, SeffPackage.eINSTANCE
474                                        .getEmitEventAction());
475 
476                        elements
477                                        .put(LoopAction_2004, SeffPackage.eINSTANCE.getLoopAction());
478 
479                        elements.put(BranchAction_2005, SeffPackage.eINSTANCE
480                                        .getBranchAction());
481 
482                        elements.put(InternalAction_2006, SeffPackage.eINSTANCE
483                                        .getInternalAction());
484 
485                        elements.put(CollectionIteratorAction_2007, SeffPackage.eINSTANCE
486                                        .getCollectionIteratorAction());
487 
488                        elements.put(SetVariableAction_2008, SeffPackage.eINSTANCE
489                                        .getSetVariableAction());
490 
491                        elements.put(AcquireAction_2012, SeffPackage.eINSTANCE
492                                        .getAcquireAction());
493 
494                        elements.put(ReleaseAction_2010, SeffPackage.eINSTANCE
495                                        .getReleaseAction());
496 
497                        elements
498                                        .put(ForkAction_2011, SeffPackage.eINSTANCE.getForkAction());
499 
500                        elements
501                                        .put(
502                                                        RecoveryAction_2016,
503                                                        de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage.eINSTANCE
504                                                                        .getRecoveryAction());
505 
506                        elements.put(VariableUsage_3042, ParameterPackage.eINSTANCE
507                                        .getVariableUsage());
508 
509                        elements.put(VariableCharacterisation_3033,
510                                        ParameterPackage.eINSTANCE.getVariableCharacterisation());
511 
512                        elements.put(VariableUsage_3049, ParameterPackage.eINSTANCE
513                                        .getVariableUsage());
514 
515                        elements.put(VariableCharacterisation_3035,
516                                        ParameterPackage.eINSTANCE.getVariableCharacterisation());
517 
518                        elements.put(VariableUsage_3047, ParameterPackage.eINSTANCE
519                                        .getVariableUsage());
520 
521                        elements.put(VariableCharacterisation_3037,
522                                        ParameterPackage.eINSTANCE.getVariableCharacterisation());
523 
524                        elements.put(ResourceDemandingBehaviour_3003, SeffPackage.eINSTANCE
525                                        .getResourceDemandingBehaviour());
526 
527                        elements.put(StartAction_3004, SeffPackage.eINSTANCE
528                                        .getStartAction());
529 
530                        elements
531                                        .put(StopAction_3005, SeffPackage.eINSTANCE.getStopAction());
532 
533                        elements
534                                        .put(LoopAction_3006, SeffPackage.eINSTANCE.getLoopAction());
535 
536                        elements.put(InternalAction_3007, SeffPackage.eINSTANCE
537                                        .getInternalAction());
538 
539                        elements
540                                        .put(
541                                                        ParametricResourceDemand_3051,
542                                                        de.uka.ipd.sdq.pcm.seff.seff_performance.Seff_performancePackage.eINSTANCE
543                                                                        .getParametricResourceDemand());
544 
545                        elements.put(InternalFailureOccurrenceDescription_3050,
546                                        ReliabilityPackage.eINSTANCE
547                                                        .getInternalFailureOccurrenceDescription());
548 
549                        elements
550                                        .put(
551                                                        InfrastructureCall_3053,
552                                                        de.uka.ipd.sdq.pcm.seff.seff_performance.Seff_performancePackage.eINSTANCE
553                                                                        .getInfrastructureCall());
554 
555                        elements.put(VariableUsage_3054, ParameterPackage.eINSTANCE
556                                        .getVariableUsage());
557 
558                        elements.put(VariableCharacterisation_3048,
559                                        ParameterPackage.eINSTANCE.getVariableCharacterisation());
560 
561                        elements.put(BranchAction_3009, SeffPackage.eINSTANCE
562                                        .getBranchAction());
563 
564                        elements.put(ProbabilisticBranchTransition_3010,
565                                        SeffPackage.eINSTANCE.getProbabilisticBranchTransition());
566 
567                        elements.put(ResourceDemandingBehaviour_3011, SeffPackage.eINSTANCE
568                                        .getResourceDemandingBehaviour());
569 
570                        elements.put(ExternalCallAction_3012, SeffPackage.eINSTANCE
571                                        .getExternalCallAction());
572 
573                        elements.put(EmitEventAction_3046, SeffPackage.eINSTANCE
574                                        .getEmitEventAction());
575 
576                        elements.put(AcquireAction_3026, SeffPackage.eINSTANCE
577                                        .getAcquireAction());
578 
579                        elements.put(ReleaseAction_3020, SeffPackage.eINSTANCE
580                                        .getReleaseAction());
581 
582                        elements
583                                        .put(ForkAction_3023, SeffPackage.eINSTANCE.getForkAction());
584 
585                        elements.put(ForkedBehaviour_3027, SeffPackage.eINSTANCE
586                                        .getForkedBehaviour());
587 
588                        elements.put(CollectionIteratorAction_3013, SeffPackage.eINSTANCE
589                                        .getCollectionIteratorAction());
590 
591                        elements.put(ResourceDemandingBehaviour_3014, SeffPackage.eINSTANCE
592                                        .getResourceDemandingBehaviour());
593 
594                        elements
595                                        .put(
596                                                        RecoveryAction_3057,
597                                                        de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage.eINSTANCE
598                                                                        .getRecoveryAction());
599 
600                        elements
601                                        .put(
602                                                        RecoveryActionBehaviour_3058,
603                                                        de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage.eINSTANCE
604                                                                        .getRecoveryActionBehaviour());
605 
606                        elements.put(SetVariableAction_3024, SeffPackage.eINSTANCE
607                                        .getSetVariableAction());
608 
609                        elements.put(VariableUsage_3036, ParameterPackage.eINSTANCE
610                                        .getVariableUsage());
611 
612                        elements.put(VariableCharacterisation_3055,
613                                        ParameterPackage.eINSTANCE.getVariableCharacterisation());
614 
615                        elements.put(SynchronisationPoint_3038, SeffPackage.eINSTANCE
616                                        .getSynchronisationPoint());
617 
618                        elements.put(ForkedBehaviour_3039, SeffPackage.eINSTANCE
619                                        .getForkedBehaviour());
620 
621                        elements.put(GuardedBranchTransition_3017, SeffPackage.eINSTANCE
622                                        .getGuardedBranchTransition());
623 
624                        elements.put(ResourceDemandingBehaviour_3018, SeffPackage.eINSTANCE
625                                        .getResourceDemandingBehaviour());
626 
627                        elements.put(AbstractActionSuccessor_AbstractAction_4001,
628                                        SeffPackage.eINSTANCE
629                                                        .getAbstractAction_Successor_AbstractAction());
630 
631                        elements
632                                        .put(
633                                                        RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004,
634                                                        de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage.eINSTANCE
635                                                                        .getRecoveryActionBehaviour_FailureHandlingAlternatives__RecoveryActionBehaviour());
636                }
637                return (ENamedElement) elements.get(type);
638        }
639 
640        /**
641         * @generated
642         */
643        private static IElementType getElementType(String id) {
644                return ElementTypeRegistry.getInstance().getType(id);
645        }
646 
647        /**
648         * @generated
649         */
650        public static boolean isKnownElementType(IElementType elementType) {
651                if (KNOWN_ELEMENT_TYPES == null) {
652                        KNOWN_ELEMENT_TYPES = new HashSet();
653                        KNOWN_ELEMENT_TYPES.add(ResourceDemandingSEFF_1000);
654                        KNOWN_ELEMENT_TYPES.add(StartAction_2001);
655                        KNOWN_ELEMENT_TYPES.add(StopAction_2002);
656                        KNOWN_ELEMENT_TYPES.add(ExternalCallAction_2003);
657                        KNOWN_ELEMENT_TYPES.add(EmitEventAction_2013);
658                        KNOWN_ELEMENT_TYPES.add(LoopAction_2004);
659                        KNOWN_ELEMENT_TYPES.add(BranchAction_2005);
660                        KNOWN_ELEMENT_TYPES.add(InternalAction_2006);
661                        KNOWN_ELEMENT_TYPES.add(CollectionIteratorAction_2007);
662                        KNOWN_ELEMENT_TYPES.add(SetVariableAction_2008);
663                        KNOWN_ELEMENT_TYPES.add(AcquireAction_2012);
664                        KNOWN_ELEMENT_TYPES.add(ReleaseAction_2010);
665                        KNOWN_ELEMENT_TYPES.add(ForkAction_2011);
666                        KNOWN_ELEMENT_TYPES.add(RecoveryAction_2016);
667                        KNOWN_ELEMENT_TYPES.add(VariableUsage_3042);
668                        KNOWN_ELEMENT_TYPES.add(VariableCharacterisation_3033);
669                        KNOWN_ELEMENT_TYPES.add(VariableUsage_3049);
670                        KNOWN_ELEMENT_TYPES.add(VariableCharacterisation_3035);
671                        KNOWN_ELEMENT_TYPES.add(VariableUsage_3047);
672                        KNOWN_ELEMENT_TYPES.add(VariableCharacterisation_3037);
673                        KNOWN_ELEMENT_TYPES.add(ResourceDemandingBehaviour_3003);
674                        KNOWN_ELEMENT_TYPES.add(StartAction_3004);
675                        KNOWN_ELEMENT_TYPES.add(StopAction_3005);
676                        KNOWN_ELEMENT_TYPES.add(LoopAction_3006);
677                        KNOWN_ELEMENT_TYPES.add(InternalAction_3007);
678                        KNOWN_ELEMENT_TYPES.add(ParametricResourceDemand_3051);
679                        KNOWN_ELEMENT_TYPES.add(InternalFailureOccurrenceDescription_3050);
680                        KNOWN_ELEMENT_TYPES.add(InfrastructureCall_3053);
681                        KNOWN_ELEMENT_TYPES.add(VariableUsage_3054);
682                        KNOWN_ELEMENT_TYPES.add(VariableCharacterisation_3048);
683                        KNOWN_ELEMENT_TYPES.add(BranchAction_3009);
684                        KNOWN_ELEMENT_TYPES.add(ProbabilisticBranchTransition_3010);
685                        KNOWN_ELEMENT_TYPES.add(ResourceDemandingBehaviour_3011);
686                        KNOWN_ELEMENT_TYPES.add(ExternalCallAction_3012);
687                        KNOWN_ELEMENT_TYPES.add(EmitEventAction_3046);
688                        KNOWN_ELEMENT_TYPES.add(AcquireAction_3026);
689                        KNOWN_ELEMENT_TYPES.add(ReleaseAction_3020);
690                        KNOWN_ELEMENT_TYPES.add(ForkAction_3023);
691                        KNOWN_ELEMENT_TYPES.add(ForkedBehaviour_3027);
692                        KNOWN_ELEMENT_TYPES.add(CollectionIteratorAction_3013);
693                        KNOWN_ELEMENT_TYPES.add(ResourceDemandingBehaviour_3014);
694                        KNOWN_ELEMENT_TYPES.add(RecoveryAction_3057);
695                        KNOWN_ELEMENT_TYPES.add(RecoveryActionBehaviour_3058);
696                        KNOWN_ELEMENT_TYPES.add(SetVariableAction_3024);
697                        KNOWN_ELEMENT_TYPES.add(VariableUsage_3036);
698                        KNOWN_ELEMENT_TYPES.add(VariableCharacterisation_3055);
699                        KNOWN_ELEMENT_TYPES.add(SynchronisationPoint_3038);
700                        KNOWN_ELEMENT_TYPES.add(ForkedBehaviour_3039);
701                        KNOWN_ELEMENT_TYPES.add(GuardedBranchTransition_3017);
702                        KNOWN_ELEMENT_TYPES.add(ResourceDemandingBehaviour_3018);
703                        KNOWN_ELEMENT_TYPES
704                                        .add(AbstractActionSuccessor_AbstractAction_4001);
705                        KNOWN_ELEMENT_TYPES
706                                        .add(RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004);
707                }
708                return KNOWN_ELEMENT_TYPES.contains(elementType);
709        }
710 
711        /**
712         * @generated
713         */
714        public static IElementType getElementType(int visualID) {
715                switch (visualID) {
716                case ResourceDemandingSEFFEditPart.VISUAL_ID:
717                        return ResourceDemandingSEFF_1000;
718                case StartActionEditPart.VISUAL_ID:
719                        return StartAction_2001;
720                case StopActionEditPart.VISUAL_ID:
721                        return StopAction_2002;
722                case ExternalCallActionEditPart.VISUAL_ID:
723                        return ExternalCallAction_2003;
724                case EmitEventActionEditPart.VISUAL_ID:
725                        return EmitEventAction_2013;
726                case LoopActionEditPart.VISUAL_ID:
727                        return LoopAction_2004;
728                case BranchActionEditPart.VISUAL_ID:
729                        return BranchAction_2005;
730                case InternalActionEditPart.VISUAL_ID:
731                        return InternalAction_2006;
732                case CollectionIteratorActionEditPart.VISUAL_ID:
733                        return CollectionIteratorAction_2007;
734                case SetVariableActionEditPart.VISUAL_ID:
735                        return SetVariableAction_2008;
736                case AcquireActionEditPart.VISUAL_ID:
737                        return AcquireAction_2012;
738                case ReleaseActionEditPart.VISUAL_ID:
739                        return ReleaseAction_2010;
740                case ForkActionEditPart.VISUAL_ID:
741                        return ForkAction_2011;
742                case RecoveryActionEditPart.VISUAL_ID:
743                        return RecoveryAction_2016;
744                case VariableUsageEditPart.VISUAL_ID:
745                        return VariableUsage_3042;
746                case VariableCharacterisationEditPart.VISUAL_ID:
747                        return VariableCharacterisation_3033;
748                case VariableUsage2EditPart.VISUAL_ID:
749                        return VariableUsage_3049;
750                case VariableCharacterisation2EditPart.VISUAL_ID:
751                        return VariableCharacterisation_3035;
752                case VariableUsage4EditPart.VISUAL_ID:
753                        return VariableUsage_3047;
754                case VariableCharacterisation3EditPart.VISUAL_ID:
755                        return VariableCharacterisation_3037;
756                case ResourceDemandingBehaviourEditPart.VISUAL_ID:
757                        return ResourceDemandingBehaviour_3003;
758                case StartAction2EditPart.VISUAL_ID:
759                        return StartAction_3004;
760                case StopAction2EditPart.VISUAL_ID:
761                        return StopAction_3005;
762                case LoopAction2EditPart.VISUAL_ID:
763                        return LoopAction_3006;
764                case InternalAction2EditPart.VISUAL_ID:
765                        return InternalAction_3007;
766                case ParametricResourceDemandEditPart.VISUAL_ID:
767                        return ParametricResourceDemand_3051;
768                case InternalFailureOccurrenceDescriptionEditPart.VISUAL_ID:
769                        return InternalFailureOccurrenceDescription_3050;
770                case InfrastructureCallEditPart.VISUAL_ID:
771                        return InfrastructureCall_3053;
772                case VariableUsage5EditPart.VISUAL_ID:
773                        return VariableUsage_3054;
774                case VariableCharacterisation4EditPart.VISUAL_ID:
775                        return VariableCharacterisation_3048;
776                case BranchAction2EditPart.VISUAL_ID:
777                        return BranchAction_3009;
778                case ProbabilisticBranchTransitionEditPart.VISUAL_ID:
779                        return ProbabilisticBranchTransition_3010;
780                case ResourceDemandingBehaviour2EditPart.VISUAL_ID:
781                        return ResourceDemandingBehaviour_3011;
782                case ExternalCallAction2EditPart.VISUAL_ID:
783                        return ExternalCallAction_3012;
784                case EmitEventAction2EditPart.VISUAL_ID:
785                        return EmitEventAction_3046;
786                case AcquireAction2EditPart.VISUAL_ID:
787                        return AcquireAction_3026;
788                case ReleaseAction2EditPart.VISUAL_ID:
789                        return ReleaseAction_3020;
790                case ForkAction2EditPart.VISUAL_ID:
791                        return ForkAction_3023;
792                case ForkedBehaviourEditPart.VISUAL_ID:
793                        return ForkedBehaviour_3027;
794                case CollectionIteratorAction2EditPart.VISUAL_ID:
795                        return CollectionIteratorAction_3013;
796                case ResourceDemandingBehaviour3EditPart.VISUAL_ID:
797                        return ResourceDemandingBehaviour_3014;
798                case RecoveryAction2EditPart.VISUAL_ID:
799                        return RecoveryAction_3057;
800                case RecoveryActionBehaviourEditPart.VISUAL_ID:
801                        return RecoveryActionBehaviour_3058;
802                case SetVariableAction2EditPart.VISUAL_ID:
803                        return SetVariableAction_3024;
804                case VariableUsage3EditPart.VISUAL_ID:
805                        return VariableUsage_3036;
806                case VariableCharacterisation5EditPart.VISUAL_ID:
807                        return VariableCharacterisation_3055;
808                case SynchronisationPointEditPart.VISUAL_ID:
809                        return SynchronisationPoint_3038;
810                case ForkedBehaviour2EditPart.VISUAL_ID:
811                        return ForkedBehaviour_3039;
812                case GuardedBranchTransitionEditPart.VISUAL_ID:
813                        return GuardedBranchTransition_3017;
814                case ResourceDemandingBehaviour4EditPart.VISUAL_ID:
815                        return ResourceDemandingBehaviour_3018;
816                case AbstractActionSuccessor_AbstractActionEditPart.VISUAL_ID:
817                        return AbstractActionSuccessor_AbstractAction_4001;
818                case RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviourEditPart.VISUAL_ID:
819                        return RecoveryActionBehaviourFailureHandlingAlternatives__RecoveryActionBehaviour_4004;
820                }
821                return null;
822        }
823 
824}

[all classes][de.uka.ipd.sdq.pcm.gmf.seff.providers]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov