EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.fzi.se.quality.parameters.pcm.provider]

COVERAGE SUMMARY FOR SOURCE FILE [PCMParameterValueItemProvider.java]

nameclass, %method, %block, %line, %
PCMParameterValueItemProvider.java0%   (0/1)0%   (0/9)0%   (0/105)0%   (0/28)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PCMParameterValueItemProvider0%   (0/1)0%   (0/9)0%   (0/105)0%   (0/28)
PCMParameterValueItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/13)0%   (0/6)
getChildFeature (Object, Object): EStructuralFeature 0%   (0/1)0%   (0/5)0%   (0/1)
getChildrenFeatures (Object): Collection 0%   (0/1)0%   (0/15)0%   (0/4)
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.fzi.se.quality.parameters.pcm.provider;
8 
9 
10import de.fzi.se.quality.parameters.pcm.PCMPackage;
11import de.fzi.se.quality.parameters.pcm.PCMParameterValue;
12 
13import de.fzi.se.quality.parameters.provider.ParameterValueItemProvider;
14 
15import de.fzi.se.quality.provider.QualityEditPlugin;
16 
17import de.uka.ipd.sdq.pcm.parameter.ParameterFactory;
18 
19import java.util.Collection;
20import java.util.List;
21 
22import org.eclipse.emf.common.notify.AdapterFactory;
23import org.eclipse.emf.common.notify.Notification;
24 
25import org.eclipse.emf.common.util.ResourceLocator;
26 
27import org.eclipse.emf.ecore.EStructuralFeature;
28 
29import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
30import org.eclipse.emf.edit.provider.IItemLabelProvider;
31import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
32import org.eclipse.emf.edit.provider.IItemPropertySource;
33import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
34import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
35import org.eclipse.emf.edit.provider.ViewerNotification;
36 
37/**
38 * This is the item provider adapter for a {@link de.fzi.se.quality.parameters.pcm.PCMParameterValue} object.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @generated
42 */
43public class PCMParameterValueItemProvider
44        extends ParameterValueItemProvider
45        implements
46                IEditingDomainItemProvider,
47                IStructuredItemContentProvider,
48                ITreeItemContentProvider,
49                IItemLabelProvider,
50                IItemPropertySource {
51        /**
52         * This constructs an instance from a factory and a notifier.
53         * <!-- begin-user-doc -->
54         * <!-- end-user-doc -->
55         * @generated
56         */
57        public PCMParameterValueItemProvider(AdapterFactory adapterFactory) {
58                super(adapterFactory);
59        }
60 
61        /**
62         * This returns the property descriptors for the adapted class.
63         * <!-- begin-user-doc -->
64         * <!-- end-user-doc -->
65         * @generated
66         */
67        @Override
68        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
69                if (itemPropertyDescriptors == null) {
70                        super.getPropertyDescriptors(object);
71 
72                }
73                return itemPropertyDescriptors;
74        }
75 
76        /**
77         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
78         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
79         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        @Override
85        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
86                if (childrenFeatures == null) {
87                        super.getChildrenFeatures(object);
88                        childrenFeatures.add(PCMPackage.Literals.PCM_PARAMETER_VALUE__VARIABLE_CHARACTERISATION);
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 PCMParameterValue.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/PCMParameterValue"));
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 = ((PCMParameterValue)object).getId();
126                return label == null || label.length() == 0 ?
127                        getString("_UI_PCMParameterValue_type") :
128                        getString("_UI_PCMParameterValue_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(PCMParameterValue.class)) {
143                        case PCMPackage.PCM_PARAMETER_VALUE__VARIABLE_CHARACTERISATION:
144                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
145                                return;
146                }
147                super.notifyChanged(notification);
148        }
149 
150        /**
151         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
152         * that can be created under this object.
153         * <!-- begin-user-doc -->
154         * <!-- end-user-doc -->
155         * @generated
156         */
157        @Override
158        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
159                super.collectNewChildDescriptors(newChildDescriptors, object);
160 
161                newChildDescriptors.add
162                        (createChildParameter
163                                (PCMPackage.Literals.PCM_PARAMETER_VALUE__VARIABLE_CHARACTERISATION,
164                                 ParameterFactory.eINSTANCE.createVariableCharacterisation()));
165        }
166 
167        /**
168         * Return the resource locator for this item provider's resources.
169         * <!-- begin-user-doc -->
170         * <!-- end-user-doc -->
171         * @generated
172         */
173        @Override
174        public ResourceLocator getResourceLocator() {
175                return QualityEditPlugin.INSTANCE;
176        }
177 
178}

[all classes][de.fzi.se.quality.parameters.pcm.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov