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

COVERAGE SUMMARY FOR SOURCE FILE [ScalarFunctionItemProvider.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

[all classes][de.uka.ipd.sdq.pcm.cost.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov