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 [DimensionItemProvider.java]

nameclass, %method, %block, %line, %
DimensionItemProvider.java0%   (0/1)0%   (0/9)0%   (0/134)0%   (0/41)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DimensionItemProvider0%   (0/1)0%   (0/9)0%   (0/134)0%   (0/41)
DimensionItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/37)0%   (0/18)
getChildFeature (Object, Object): EStructuralFeature 0%   (0/1)0%   (0/5)0%   (0/1)
getChildrenFeatures (Object): Collection 0%   (0/1)0%   (0/20)0%   (0/5)
getImage (Object): Object 0%   (0/1)0%   (0/8)0%   (0/1)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/10)0%   (0/3)
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.Dimension;
11import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypeFactory;
12import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypePackage;
13 
14import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider.QMLProfileEditPlugin;
15 
16import de.uka.ipd.sdq.pcm.core.entity.provider.EntityItemProvider;
17 
18import java.util.Collection;
19import java.util.List;
20 
21import org.eclipse.emf.common.notify.AdapterFactory;
22import org.eclipse.emf.common.notify.Notification;
23 
24import org.eclipse.emf.common.util.ResourceLocator;
25 
26import org.eclipse.emf.ecore.EStructuralFeature;
27 
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.ViewerNotification;
35 
36/**
37 * This is the item provider adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.Dimension} object.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @generated
41 */
42public class DimensionItemProvider
43        extends EntityItemProvider
44        implements
45                IEditingDomainItemProvider,
46                IStructuredItemContentProvider,
47                ITreeItemContentProvider,
48                IItemLabelProvider,
49                IItemPropertySource {
50        /**
51         * This constructs an instance from a factory and a notifier.
52         * <!-- begin-user-doc -->
53         * <!-- end-user-doc -->
54         * @generated
55         */
56        public DimensionItemProvider(AdapterFactory adapterFactory) {
57                super(adapterFactory);
58        }
59 
60        /**
61         * This returns the property descriptors for the adapted class.
62         * <!-- begin-user-doc -->
63         * <!-- end-user-doc -->
64         * @generated
65         */
66        @Override
67        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
68                if (itemPropertyDescriptors == null) {
69                        super.getPropertyDescriptors(object);
70 
71                }
72                return itemPropertyDescriptors;
73        }
74 
75        /**
76         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
77         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
78         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
79         * <!-- begin-user-doc -->
80         * <!-- end-user-doc -->
81         * @generated
82         */
83        @Override
84        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
85                if (childrenFeatures == null) {
86                        super.getChildrenFeatures(object);
87                        childrenFeatures.add(QMLContractTypePackage.Literals.DIMENSION__TYPE);
88                        childrenFeatures.add(QMLContractTypePackage.Literals.DIMENSION__UNIT);
89                }
90                return childrenFeatures;
91        }
92 
93        /**
94         * <!-- begin-user-doc -->
95         * <!-- end-user-doc -->
96         * @generated
97         */
98        @Override
99        protected EStructuralFeature getChildFeature(Object object, Object child) {
100                // Check the type of the specified child object and return the proper feature to use for
101                // adding (see {@link AddCommand}) it as a child.
102 
103                return super.getChildFeature(object, child);
104        }
105 
106        /**
107         * This returns Dimension.gif.
108         * <!-- begin-user-doc -->
109         * <!-- end-user-doc -->
110         * @generated
111         */
112        @Override
113        public Object getImage(Object object) {
114                return overlayImage(object, getResourceLocator().getImage("full/obj16/Dimension"));
115        }
116 
117        /**
118         * This returns the label text for the adapted class.
119         * <!-- begin-user-doc -->
120         * <!-- end-user-doc -->
121         * @generated
122         */
123        @Override
124        public String getText(Object object) {
125                String label = ((Dimension)object).getId();
126                return label == null || label.length() == 0 ?
127                        getString("_UI_Dimension_type") :
128                        getString("_UI_Dimension_type") + " " + label;
129        }
130 
131        /**
132         * This handles model notifications by calling {@link #updateChildren} to update any cached
133         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
134         * <!-- begin-user-doc -->
135         * <!-- end-user-doc -->
136         * @generated
137         */
138        @Override
139        public void notifyChanged(Notification notification) {
140                updateChildren(notification);
141 
142                switch (notification.getFeatureID(Dimension.class)) {
143                        case QMLContractTypePackage.DIMENSION__TYPE:
144                        case QMLContractTypePackage.DIMENSION__UNIT:
145                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
146                                return;
147                }
148                super.notifyChanged(notification);
149        }
150 
151        /**
152         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
153         * that can be created under this object.
154         * <!-- begin-user-doc -->
155         * <!-- end-user-doc -->
156         * @generated
157         */
158        @Override
159        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
160                super.collectNewChildDescriptors(newChildDescriptors, object);
161 
162                newChildDescriptors.add
163                        (createChildParameter
164                                (QMLContractTypePackage.Literals.DIMENSION__TYPE,
165                                 QMLContractTypeFactory.eINSTANCE.createDimensionTypeSet()));
166 
167                newChildDescriptors.add
168                        (createChildParameter
169                                (QMLContractTypePackage.Literals.DIMENSION__TYPE,
170                                 QMLContractTypeFactory.eINSTANCE.createDimensionTypeEnum()));
171 
172                newChildDescriptors.add
173                        (createChildParameter
174                                (QMLContractTypePackage.Literals.DIMENSION__TYPE,
175                                 QMLContractTypeFactory.eINSTANCE.createDimensionTypeNumeric()));
176 
177                newChildDescriptors.add
178                        (createChildParameter
179                                (QMLContractTypePackage.Literals.DIMENSION__UNIT,
180                                 QMLContractTypeFactory.eINSTANCE.createUnit()));
181        }
182 
183        /**
184         * Return the resource locator for this item provider's resources.
185         * <!-- begin-user-doc -->
186         * <!-- end-user-doc -->
187         * @generated
188         */
189        @Override
190        public ResourceLocator getResourceLocator() {
191                return QMLProfileEditPlugin.INSTANCE;
192        }
193 
194}

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