EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.context.computed_usage.provider]

COVERAGE SUMMARY FOR SOURCE FILE [ComputedUsageContextItemProvider.java]

nameclass, %method, %block, %line, %
ComputedUsageContextItemProvider.java0%   (0/1)0%   (0/10)0%   (0/201)0%   (0/68)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComputedUsageContextItemProvider0%   (0/1)0%   (0/10)0%   (0/201)0%   (0/68)
ComputedUsageContextItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addAssemblyContext_ComputedUsageContextPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/53)0%   (0/26)
getChildFeature (Object, Object): EStructuralFeature 0%   (0/1)0%   (0/5)0%   (0/1)
getChildrenFeatures (Object): Collection 0%   (0/1)0%   (0/40)0%   (0/9)
getImage (Object): Object 0%   (0/1)0%   (0/8)0%   (0/1)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/13)0%   (0/4)
getResourceLocator (): ResourceLocator 0%   (0/1)0%   (0/2)0%   (0/1)
getText (Object): String 0%   (0/1)0%   (0/26)0%   (0/4)
notifyChanged (Notification): void 0%   (0/1)0%   (0/22)0%   (0/6)

1/**
2 * Copyright 2006, SDQ Group, University Karlsruhe (TH)
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.context.computed_usage.provider;
7 
8 
9import de.uka.ipd.sdq.context.computed_usage.ComputedUsageContext;
10import de.uka.ipd.sdq.context.computed_usage.ComputedUsageFactory;
11import de.uka.ipd.sdq.context.computed_usage.ComputedUsagePackage;
12 
13import de.uka.ipd.sdq.pcm.core.entity.provider.EntityItemProvider;
14import de.uka.ipd.sdq.pcm.parameter.ParameterFactory;
15 
16import java.util.Collection;
17import java.util.List;
18 
19import org.eclipse.emf.common.notify.AdapterFactory;
20import org.eclipse.emf.common.notify.Notification;
21 
22import org.eclipse.emf.common.util.ResourceLocator;
23 
24import org.eclipse.emf.ecore.EStructuralFeature;
25 
26import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
27import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
28import org.eclipse.emf.edit.provider.IItemLabelProvider;
29import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
30import org.eclipse.emf.edit.provider.IItemPropertySource;
31import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
32import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
33import org.eclipse.emf.edit.provider.ItemProviderAdapter;
34import org.eclipse.emf.edit.provider.ViewerNotification;
35 
36/**
37 * This is the item provider adapter for a {@link de.uka.ipd.sdq.context.computed_usage.ComputedUsageContext} object.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @generated
41 */
42public class ComputedUsageContextItemProvider
43        extends EntityItemProvider
44        implements        
45                IEditingDomainItemProvider,        
46                IStructuredItemContentProvider,        
47                ITreeItemContentProvider,        
48                IItemLabelProvider,        
49                IItemPropertySource {
50        /**
51         * <!-- begin-user-doc -->
52         * <!-- end-user-doc -->
53         * @generated
54         */
55        public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)";
56 
57        /**
58         * This constructs an instance from a factory and a notifier.
59         * <!-- begin-user-doc -->
60         * <!-- end-user-doc -->
61         * @generated
62         */
63        public ComputedUsageContextItemProvider(AdapterFactory adapterFactory) {
64                super(adapterFactory);
65        }
66 
67        /**
68         * This returns the property descriptors for the adapted class.
69         * <!-- begin-user-doc -->
70         * <!-- end-user-doc -->
71         * @generated
72         */
73        @Override
74        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
75                if (itemPropertyDescriptors == null) {
76                        super.getPropertyDescriptors(object);
77 
78                        addAssemblyContext_ComputedUsageContextPropertyDescriptor(object);
79                }
80                return itemPropertyDescriptors;
81        }
82 
83        /**
84         * This adds a property descriptor for the Assembly Context Computed Usage Context feature.
85         * <!-- begin-user-doc -->
86         * <!-- end-user-doc -->
87         * @generated
88         */
89        protected void addAssemblyContext_ComputedUsageContextPropertyDescriptor(Object object) {
90                itemPropertyDescriptors.add
91                        (createItemPropertyDescriptor
92                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
93                                 getResourceLocator(),
94                                 getString("_UI_ComputedUsageContext_assemblyContext_ComputedUsageContext_feature"),
95                                 getString("_UI_PropertyDescriptor_description", "_UI_ComputedUsageContext_assemblyContext_ComputedUsageContext_feature", "_UI_ComputedUsageContext_type"),
96                                 ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__ASSEMBLY_CONTEXT_COMPUTED_USAGE_CONTEXT,
97                                 true,
98                                 false,
99                                 true,
100                                 null,
101                                 null,
102                                 null));
103        }
104 
105        /**
106         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
107         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
108         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
109         * <!-- begin-user-doc -->
110         * <!-- end-user-doc -->
111         * @generated
112         */
113        @Override
114        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
115                if (childrenFeatures == null) {
116                        super.getChildrenFeatures(object);
117                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__BRANCH_PROBABILITIES_COMPUTED_USAGE_CONTEXT);
118                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__LOOPITERATIONS_COMPUTED_USAGE_CONTEXT);
119                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__INPUT_COMPUTED_USAGE_CONTEXT);
120                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_OUTPUT_COMPUTED_USAGE_CONTEXT);
121                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_INPUT_COMPUTED_USAGE_CONTEXT);
122                        childrenFeatures.add(ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__OUTPUT_COMPUTED_USAGE_CONTEXT);
123                }
124                return childrenFeatures;
125        }
126 
127        /**
128         * <!-- begin-user-doc -->
129         * <!-- end-user-doc -->
130         * @generated
131         */
132        @Override
133        protected EStructuralFeature getChildFeature(Object object, Object child) {
134                // Check the type of the specified child object and return the proper feature to use for
135                // adding (see {@link AddCommand}) it as a child.
136 
137                return super.getChildFeature(object, child);
138        }
139 
140        /**
141         * This returns ComputedUsageContext.gif.
142         * <!-- begin-user-doc -->
143         * <!-- end-user-doc -->
144         * @generated
145         */
146        @Override
147        public Object getImage(Object object) {
148                return overlayImage(object, getResourceLocator().getImage("full/obj16/ComputedUsageContext"));
149        }
150 
151        /**
152         * This returns the label text for the adapted class.
153         * <!-- begin-user-doc -->
154         * <!-- end-user-doc -->
155         * @generated
156         */
157        @Override
158        public String getText(Object object) {
159                String label = ((ComputedUsageContext)object).getId();
160                return label == null || label.length() == 0 ?
161                        getString("_UI_ComputedUsageContext_type") :
162                        getString("_UI_ComputedUsageContext_type") + " " + label;
163        }
164 
165        /**
166         * This handles model notifications by calling {@link #updateChildren} to update any cached
167         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
168         * <!-- begin-user-doc -->
169         * <!-- end-user-doc -->
170         * @generated
171         */
172        @Override
173        public void notifyChanged(Notification notification) {
174                updateChildren(notification);
175 
176                switch (notification.getFeatureID(ComputedUsageContext.class)) {
177                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__BRANCH_PROBABILITIES_COMPUTED_USAGE_CONTEXT:
178                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__LOOPITERATIONS_COMPUTED_USAGE_CONTEXT:
179                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__INPUT_COMPUTED_USAGE_CONTEXT:
180                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_OUTPUT_COMPUTED_USAGE_CONTEXT:
181                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_INPUT_COMPUTED_USAGE_CONTEXT:
182                        case ComputedUsagePackage.COMPUTED_USAGE_CONTEXT__OUTPUT_COMPUTED_USAGE_CONTEXT:
183                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
184                                return;
185                }
186                super.notifyChanged(notification);
187        }
188 
189        /**
190         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
191         * that can be created under this object.
192         * <!-- begin-user-doc -->
193         * <!-- end-user-doc -->
194         * @generated
195         */
196        @Override
197        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
198                super.collectNewChildDescriptors(newChildDescriptors, object);
199 
200                newChildDescriptors.add
201                        (createChildParameter
202                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__BRANCH_PROBABILITIES_COMPUTED_USAGE_CONTEXT,
203                                 ComputedUsageFactory.eINSTANCE.createBranchProbability()));
204 
205                newChildDescriptors.add
206                        (createChildParameter
207                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__LOOPITERATIONS_COMPUTED_USAGE_CONTEXT,
208                                 ComputedUsageFactory.eINSTANCE.createLoopIteration()));
209 
210                newChildDescriptors.add
211                        (createChildParameter
212                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__INPUT_COMPUTED_USAGE_CONTEXT,
213                                 ComputedUsageFactory.eINSTANCE.createInput()));
214 
215                newChildDescriptors.add
216                        (createChildParameter
217                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_OUTPUT_COMPUTED_USAGE_CONTEXT,
218                                 ComputedUsageFactory.eINSTANCE.createExternalCallOutput()));
219 
220                newChildDescriptors.add
221                        (createChildParameter
222                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__EXTERNAL_CALL_INPUT_COMPUTED_USAGE_CONTEXT,
223                                 ComputedUsageFactory.eINSTANCE.createExternalCallInput()));
224 
225                newChildDescriptors.add
226                        (createChildParameter
227                                (ComputedUsagePackage.Literals.COMPUTED_USAGE_CONTEXT__OUTPUT_COMPUTED_USAGE_CONTEXT,
228                                 ComputedUsageFactory.eINSTANCE.createOutput()));
229        }
230 
231        /**
232         * Return the resource locator for this item provider's resources.
233         * <!-- begin-user-doc -->
234         * <!-- end-user-doc -->
235         * @generated
236         */
237        @Override
238        public ResourceLocator getResourceLocator() {
239                return ContextEditPlugin.INSTANCE;
240        }
241 
242}

[all classes][de.uka.ipd.sdq.context.computed_usage.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov