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

COVERAGE SUMMARY FOR SOURCE FILE [FrequencyItemProvider.java]

nameclass, %method, %block, %line, %
FrequencyItemProvider.java0%   (0/1)0%   (0/9)0%   (0/163)0%   (0/42)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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