EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][EMOF.provider]

COVERAGE SUMMARY FOR SOURCE FILE [ParameterItemProvider.java]

nameclass, %method, %block, %line, %
ParameterItemProvider.java0%   (0/1)0%   (0/10)0%   (0/199)0%   (0/78)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ParameterItemProvider0%   (0/1)0%   (0/10)0%   (0/199)0%   (0/78)
ParameterItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addIsOrderedPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addIsUniquePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addLowerPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addUpperPropertyDescriptor (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/22)0%   (0/7)
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 EMOF.provider;
8 
9 
10import EMOF.EMOFPackage;
11import EMOF.Parameter;
12 
13import java.util.Collection;
14import java.util.List;
15 
16import org.eclipse.emf.common.notify.AdapterFactory;
17import org.eclipse.emf.common.notify.Notification;
18 
19import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
20import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
21import org.eclipse.emf.edit.provider.IItemLabelProvider;
22import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.IItemPropertySource;
24import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
25import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
26import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
27import org.eclipse.emf.edit.provider.ViewerNotification;
28 
29/**
30 * This is the item provider adapter for a {@link EMOF.Parameter} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class ParameterItemProvider
36        extends TypedElementItemProvider
37        implements
38                IEditingDomainItemProvider,
39                IStructuredItemContentProvider,
40                ITreeItemContentProvider,
41                IItemLabelProvider,
42                IItemPropertySource {
43        /**
44         * This constructs an instance from a factory and a notifier.
45         * <!-- begin-user-doc -->
46         * <!-- end-user-doc -->
47         * @generated
48         */
49        public ParameterItemProvider(AdapterFactory adapterFactory) {
50                super(adapterFactory);
51        }
52 
53        /**
54         * This returns the property descriptors for the adapted class.
55         * <!-- begin-user-doc -->
56         * <!-- end-user-doc -->
57         * @generated
58         */
59        @Override
60        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
61                if (itemPropertyDescriptors == null) {
62                        super.getPropertyDescriptors(object);
63 
64                        addIsOrderedPropertyDescriptor(object);
65                        addIsUniquePropertyDescriptor(object);
66                        addLowerPropertyDescriptor(object);
67                        addUpperPropertyDescriptor(object);
68                }
69                return itemPropertyDescriptors;
70        }
71 
72        /**
73         * This adds a property descriptor for the Is Ordered feature.
74         * <!-- begin-user-doc -->
75         * <!-- end-user-doc -->
76         * @generated
77         */
78        protected void addIsOrderedPropertyDescriptor(Object object) {
79                itemPropertyDescriptors.add
80                        (createItemPropertyDescriptor
81                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82                                 getResourceLocator(),
83                                 getString("_UI_MultiplicityElement_isOrdered_feature"),
84                                 getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_isOrdered_feature", "_UI_MultiplicityElement_type"),
85                                 EMOFPackage.Literals.MULTIPLICITY_ELEMENT__IS_ORDERED,
86                                 true,
87                                 false,
88                                 false,
89                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
90                                 null,
91                                 null));
92        }
93 
94        /**
95         * This adds a property descriptor for the Is Unique feature.
96         * <!-- begin-user-doc -->
97         * <!-- end-user-doc -->
98         * @generated
99         */
100        protected void addIsUniquePropertyDescriptor(Object object) {
101                itemPropertyDescriptors.add
102                        (createItemPropertyDescriptor
103                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
104                                 getResourceLocator(),
105                                 getString("_UI_MultiplicityElement_isUnique_feature"),
106                                 getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_isUnique_feature", "_UI_MultiplicityElement_type"),
107                                 EMOFPackage.Literals.MULTIPLICITY_ELEMENT__IS_UNIQUE,
108                                 true,
109                                 false,
110                                 false,
111                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
112                                 null,
113                                 null));
114        }
115 
116        /**
117         * This adds a property descriptor for the Lower feature.
118         * <!-- begin-user-doc -->
119         * <!-- end-user-doc -->
120         * @generated
121         */
122        protected void addLowerPropertyDescriptor(Object object) {
123                itemPropertyDescriptors.add
124                        (createItemPropertyDescriptor
125                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
126                                 getResourceLocator(),
127                                 getString("_UI_MultiplicityElement_lower_feature"),
128                                 getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_lower_feature", "_UI_MultiplicityElement_type"),
129                                 EMOFPackage.Literals.MULTIPLICITY_ELEMENT__LOWER,
130                                 true,
131                                 false,
132                                 false,
133                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
134                                 null,
135                                 null));
136        }
137 
138        /**
139         * This adds a property descriptor for the Upper feature.
140         * <!-- begin-user-doc -->
141         * <!-- end-user-doc -->
142         * @generated
143         */
144        protected void addUpperPropertyDescriptor(Object object) {
145                itemPropertyDescriptors.add
146                        (createItemPropertyDescriptor
147                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
148                                 getResourceLocator(),
149                                 getString("_UI_MultiplicityElement_upper_feature"),
150                                 getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_upper_feature", "_UI_MultiplicityElement_type"),
151                                 EMOFPackage.Literals.MULTIPLICITY_ELEMENT__UPPER,
152                                 true,
153                                 false,
154                                 false,
155                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
156                                 null,
157                                 null));
158        }
159 
160        /**
161         * This returns Parameter.gif.
162         * <!-- begin-user-doc -->
163         * <!-- end-user-doc -->
164         * @generated
165         */
166        @Override
167        public Object getImage(Object object) {
168                return overlayImage(object, getResourceLocator().getImage("full/obj16/Parameter"));
169        }
170 
171        /**
172         * This returns the label text for the adapted class.
173         * <!-- begin-user-doc -->
174         * <!-- end-user-doc -->
175         * @generated
176         */
177        @Override
178        public String getText(Object object) {
179                String label = ((Parameter)object).getName();
180                return label == null || label.length() == 0 ?
181                        getString("_UI_Parameter_type") :
182                        getString("_UI_Parameter_type") + " " + label;
183        }
184 
185        /**
186         * This handles model notifications by calling {@link #updateChildren} to update any cached
187         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
188         * <!-- begin-user-doc -->
189         * <!-- end-user-doc -->
190         * @generated
191         */
192        @Override
193        public void notifyChanged(Notification notification) {
194                updateChildren(notification);
195 
196                switch (notification.getFeatureID(Parameter.class)) {
197                        case EMOFPackage.PARAMETER__IS_ORDERED:
198                        case EMOFPackage.PARAMETER__IS_UNIQUE:
199                        case EMOFPackage.PARAMETER__LOWER:
200                        case EMOFPackage.PARAMETER__UPPER:
201                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
202                                return;
203                }
204                super.notifyChanged(notification);
205        }
206 
207        /**
208         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
209         * that can be created under this object.
210         * <!-- begin-user-doc -->
211         * <!-- end-user-doc -->
212         * @generated
213         */
214        @Override
215        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
216                super.collectNewChildDescriptors(newChildDescriptors, object);
217        }
218 
219}

[all classes][EMOF.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov