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

COVERAGE SUMMARY FOR SOURCE FILE [PCMParameterPartitionItemProvider.java]

nameclass, %method, %block, %line, %
PCMParameterPartitionItemProvider.java0%   (0/1)0%   (0/9)0%   (0/142)0%   (0/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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