EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.fzi.se.quality.qualityannotation.provider]

COVERAGE SUMMARY FOR SOURCE FILE [CallParameterDeviationItemProvider.java]

nameclass, %method, %block, %line, %
CallParameterDeviationItemProvider.java0%   (0/1)0%   (0/10)0%   (0/154)0%   (0/51)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CallParameterDeviationItemProvider0%   (0/1)0%   (0/10)0%   (0/154)0%   (0/51)
CallParameterDeviationItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addMaximumPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/29)0%   (0/14)
getChildFeature (Object, Object): EStructuralFeature 0%   (0/1)0%   (0/5)0%   (0/1)
getChildrenFeatures (Object): Collection 0%   (0/1)0%   (0/15)0%   (0/4)
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/17)0%   (0/2)
notifyChanged (Notification): void 0%   (0/1)0%   (0/33)0%   (0/8)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.fzi.se.quality.qualityannotation.provider;
8 
9 
10import de.fzi.se.quality.parameters.pcm.PCMFactory;
11 
12import de.fzi.se.quality.provider.QualityEditPlugin;
13 
14import de.fzi.se.quality.qualityannotation.CallParameterDeviation;
15import de.fzi.se.quality.qualityannotation.QualityAnnotationPackage;
16 
17import java.util.Collection;
18import java.util.List;
19 
20import org.eclipse.emf.common.notify.AdapterFactory;
21import org.eclipse.emf.common.notify.Notification;
22 
23import org.eclipse.emf.common.util.ResourceLocator;
24 
25import org.eclipse.emf.ecore.EStructuralFeature;
26 
27import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
28import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
29import org.eclipse.emf.edit.provider.IItemLabelProvider;
30import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
31import org.eclipse.emf.edit.provider.IItemPropertySource;
32import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
33import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
34import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
35import org.eclipse.emf.edit.provider.ItemProviderAdapter;
36import org.eclipse.emf.edit.provider.ViewerNotification;
37 
38/**
39 * This is the item provider adapter for a {@link de.fzi.se.quality.qualityannotation.CallParameterDeviation} object.
40 * <!-- begin-user-doc -->
41 * <!-- end-user-doc -->
42 * @generated
43 */
44public class CallParameterDeviationItemProvider
45        extends ItemProviderAdapter
46        implements
47                IEditingDomainItemProvider,
48                IStructuredItemContentProvider,
49                ITreeItemContentProvider,
50                IItemLabelProvider,
51                IItemPropertySource {
52        /**
53         * This constructs an instance from a factory and a notifier.
54         * <!-- begin-user-doc -->
55         * <!-- end-user-doc -->
56         * @generated
57         */
58        public CallParameterDeviationItemProvider(AdapterFactory adapterFactory) {
59                super(adapterFactory);
60        }
61 
62        /**
63         * This returns the property descriptors for the adapted class.
64         * <!-- begin-user-doc -->
65         * <!-- end-user-doc -->
66         * @generated
67         */
68        @Override
69        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
70                if (itemPropertyDescriptors == null) {
71                        super.getPropertyDescriptors(object);
72 
73                        addMaximumPropertyDescriptor(object);
74                }
75                return itemPropertyDescriptors;
76        }
77 
78        /**
79         * This adds a property descriptor for the Maximum feature.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        protected void addMaximumPropertyDescriptor(Object object) {
85                itemPropertyDescriptors.add
86                        (createItemPropertyDescriptor
87                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
88                                 getResourceLocator(),
89                                 getString("_UI_CallParameterDeviation_maximum_feature"),
90                                 getString("_UI_PropertyDescriptor_description", "_UI_CallParameterDeviation_maximum_feature", "_UI_CallParameterDeviation_type"),
91                                 QualityAnnotationPackage.Literals.CALL_PARAMETER_DEVIATION__MAXIMUM,
92                                 true,
93                                 false,
94                                 false,
95                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
96                                 null,
97                                 null));
98        }
99 
100        /**
101         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
102         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
103         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
104         * <!-- begin-user-doc -->
105         * <!-- end-user-doc -->
106         * @generated
107         */
108        @Override
109        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
110                if (childrenFeatures == null) {
111                        super.getChildrenFeatures(object);
112                        childrenFeatures.add(QualityAnnotationPackage.Literals.CALL_PARAMETER_DEVIATION__PARAMETER_REFERENCE);
113                }
114                return childrenFeatures;
115        }
116 
117        /**
118         * <!-- begin-user-doc -->
119         * <!-- end-user-doc -->
120         * @generated
121         */
122        @Override
123        protected EStructuralFeature getChildFeature(Object object, Object child) {
124                // Check the type of the specified child object and return the proper feature to use for
125                // adding (see {@link AddCommand}) it as a child.
126 
127                return super.getChildFeature(object, child);
128        }
129 
130        /**
131         * This returns CallParameterDeviation.gif.
132         * <!-- begin-user-doc -->
133         * <!-- end-user-doc -->
134         * @generated
135         */
136        @Override
137        public Object getImage(Object object) {
138                return overlayImage(object, getResourceLocator().getImage("full/obj16/CallParameterDeviation"));
139        }
140 
141        /**
142         * This returns the label text for the adapted class.
143         * <!-- begin-user-doc -->
144         * <!-- end-user-doc -->
145         * @generated
146         */
147        @Override
148        public String getText(Object object) {
149                CallParameterDeviation callParameterDeviation = (CallParameterDeviation)object;
150                return getString("_UI_CallParameterDeviation_type") + " " + callParameterDeviation.getMaximum();
151        }
152 
153        /**
154         * This handles model notifications by calling {@link #updateChildren} to update any cached
155         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
156         * <!-- begin-user-doc -->
157         * <!-- end-user-doc -->
158         * @generated
159         */
160        @Override
161        public void notifyChanged(Notification notification) {
162                updateChildren(notification);
163 
164                switch (notification.getFeatureID(CallParameterDeviation.class)) {
165                        case QualityAnnotationPackage.CALL_PARAMETER_DEVIATION__MAXIMUM:
166                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
167                                return;
168                        case QualityAnnotationPackage.CALL_PARAMETER_DEVIATION__PARAMETER_REFERENCE:
169                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
170                                return;
171                }
172                super.notifyChanged(notification);
173        }
174 
175        /**
176         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
177         * that can be created under this object.
178         * <!-- begin-user-doc -->
179         * <!-- end-user-doc -->
180         * @generated
181         */
182        @Override
183        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
184                super.collectNewChildDescriptors(newChildDescriptors, object);
185 
186                newChildDescriptors.add
187                        (createChildParameter
188                                (QualityAnnotationPackage.Literals.CALL_PARAMETER_DEVIATION__PARAMETER_REFERENCE,
189                                 PCMFactory.eINSTANCE.createPCMComponentParameterReference()));
190 
191                newChildDescriptors.add
192                        (createChildParameter
193                                (QualityAnnotationPackage.Literals.CALL_PARAMETER_DEVIATION__PARAMETER_REFERENCE,
194                                 PCMFactory.eINSTANCE.createPCMOperationParameterReference()));
195 
196                newChildDescriptors.add
197                        (createChildParameter
198                                (QualityAnnotationPackage.Literals.CALL_PARAMETER_DEVIATION__PARAMETER_REFERENCE,
199                                 PCMFactory.eINSTANCE.createPCMRequiredBusinessOperationReturnParameterReference()));
200        }
201 
202        /**
203         * Return the resource locator for this item provider's resources.
204         * <!-- begin-user-doc -->
205         * <!-- end-user-doc -->
206         * @generated
207         */
208        @Override
209        public ResourceLocator getResourceLocator() {
210                return QualityEditPlugin.INSTANCE;
211        }
212 
213}

[all classes][de.fzi.se.quality.qualityannotation.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov