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

COVERAGE SUMMARY FOR SOURCE FILE [NumericRangeItemProvider.java]

nameclass, %method, %block, %line, %
NumericRangeItemProvider.java0%   (0/1)0%   (0/9)0%   (0/139)0%   (0/49)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NumericRangeItemProvider0%   (0/1)0%   (0/9)0%   (0/139)0%   (0/49)
NumericRangeItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addLowerLimitPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addUpperLimitPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/5)0%   (0/2)
getImage (Object): Object 0%   (0/1)0%   (0/8)0%   (0/1)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/16)0%   (0/5)
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>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.provider;
8 
9 
10import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.NumericRange;
11import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypePackage;
12 
13import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider.QMLProfileEditPlugin;
14 
15import de.uka.ipd.sdq.identifier.provider.IdentifierItemProvider;
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.edit.provider.ComposeableAdapterFactory;
26import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
27import org.eclipse.emf.edit.provider.IItemLabelProvider;
28import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
29import org.eclipse.emf.edit.provider.IItemPropertySource;
30import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
31import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
32import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
33import org.eclipse.emf.edit.provider.ViewerNotification;
34 
35/**
36 * This is the item provider adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.NumericRange} object.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @generated
40 */
41public class NumericRangeItemProvider
42        extends IdentifierItemProvider
43        implements
44                IEditingDomainItemProvider,
45                IStructuredItemContentProvider,
46                ITreeItemContentProvider,
47                IItemLabelProvider,
48                IItemPropertySource {
49        /**
50         * This constructs an instance from a factory and a notifier.
51         * <!-- begin-user-doc -->
52         * <!-- end-user-doc -->
53         * @generated
54         */
55        public NumericRangeItemProvider(AdapterFactory adapterFactory) {
56                super(adapterFactory);
57        }
58 
59        /**
60         * This returns the property descriptors for the adapted class.
61         * <!-- begin-user-doc -->
62         * <!-- end-user-doc -->
63         * @generated
64         */
65        @Override
66        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
67                if (itemPropertyDescriptors == null) {
68                        super.getPropertyDescriptors(object);
69 
70                        addLowerLimitPropertyDescriptor(object);
71                        addUpperLimitPropertyDescriptor(object);
72                }
73                return itemPropertyDescriptors;
74        }
75 
76        /**
77         * This adds a property descriptor for the Lower Limit feature.
78         * <!-- begin-user-doc -->
79         * <!-- end-user-doc -->
80         * @generated
81         */
82        protected void addLowerLimitPropertyDescriptor(Object object) {
83                itemPropertyDescriptors.add
84                        (createItemPropertyDescriptor
85                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
86                                 getResourceLocator(),
87                                 getString("_UI_NumericRange_lowerLimit_feature"),
88                                 getString("_UI_PropertyDescriptor_description", "_UI_NumericRange_lowerLimit_feature", "_UI_NumericRange_type"),
89                                 QMLContractTypePackage.Literals.NUMERIC_RANGE__LOWER_LIMIT,
90                                 true,
91                                 false,
92                                 false,
93                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
94                                 null,
95                                 null));
96        }
97 
98        /**
99         * This adds a property descriptor for the Upper Limit feature.
100         * <!-- begin-user-doc -->
101         * <!-- end-user-doc -->
102         * @generated
103         */
104        protected void addUpperLimitPropertyDescriptor(Object object) {
105                itemPropertyDescriptors.add
106                        (createItemPropertyDescriptor
107                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
108                                 getResourceLocator(),
109                                 getString("_UI_NumericRange_upperLimit_feature"),
110                                 getString("_UI_PropertyDescriptor_description", "_UI_NumericRange_upperLimit_feature", "_UI_NumericRange_type"),
111                                 QMLContractTypePackage.Literals.NUMERIC_RANGE__UPPER_LIMIT,
112                                 true,
113                                 false,
114                                 false,
115                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
116                                 null,
117                                 null));
118        }
119 
120        /**
121         * This returns NumericRange.gif.
122         * <!-- begin-user-doc -->
123         * <!-- end-user-doc -->
124         * @generated
125         */
126        @Override
127        public Object getImage(Object object) {
128                return overlayImage(object, getResourceLocator().getImage("full/obj16/NumericRange"));
129        }
130 
131        /**
132         * This returns the label text for the adapted class.
133         * <!-- begin-user-doc -->
134         * <!-- end-user-doc -->
135         * @generated
136         */
137        @Override
138        public String getText(Object object) {
139                String label = ((NumericRange)object).getId();
140                return label == null || label.length() == 0 ?
141                        getString("_UI_NumericRange_type") :
142                        getString("_UI_NumericRange_type") + " " + label;
143        }
144 
145        /**
146         * This handles model notifications by calling {@link #updateChildren} to update any cached
147         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
148         * <!-- begin-user-doc -->
149         * <!-- end-user-doc -->
150         * @generated
151         */
152        @Override
153        public void notifyChanged(Notification notification) {
154                updateChildren(notification);
155 
156                switch (notification.getFeatureID(NumericRange.class)) {
157                        case QMLContractTypePackage.NUMERIC_RANGE__LOWER_LIMIT:
158                        case QMLContractTypePackage.NUMERIC_RANGE__UPPER_LIMIT:
159                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
160                                return;
161                }
162                super.notifyChanged(notification);
163        }
164 
165        /**
166         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
167         * that can be created under this object.
168         * <!-- begin-user-doc -->
169         * <!-- end-user-doc -->
170         * @generated
171         */
172        @Override
173        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
174                super.collectNewChildDescriptors(newChildDescriptors, object);
175        }
176 
177        /**
178         * Return the resource locator for this item provider's resources.
179         * <!-- begin-user-doc -->
180         * <!-- end-user-doc -->
181         * @generated
182         */
183        @Override
184        public ResourceLocator getResourceLocator() {
185                return QMLProfileEditPlugin.INSTANCE;
186        }
187 
188}

[all classes][de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov