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

COVERAGE SUMMARY FOR SOURCE FILE [FeatureGroupItemProvider.java]

nameclass, %method, %block, %line, %
FeatureGroupItemProvider.java0%   (0/1)0%   (0/10)0%   (0/167)0%   (0/57)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FeatureGroupItemProvider0%   (0/1)0%   (0/10)0%   (0/167)0%   (0/57)
FeatureGroupItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addMaxPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addMinPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
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/16)0%   (0/5)
getText (Object): String 0%   (0/1)0%   (0/17)0%   (0/2)
notifyChanged (Notification): void 0%   (0/1)0%   (0/33)0%   (0/8)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.featuremodel.provider;
8 
9 
10import java.util.Collection;
11import java.util.List;
12 
13import org.eclipse.emf.common.notify.AdapterFactory;
14import org.eclipse.emf.common.notify.Notification;
15import org.eclipse.emf.ecore.EStructuralFeature;
16import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
17import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
18import org.eclipse.emf.edit.provider.IItemLabelProvider;
19import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
20import org.eclipse.emf.edit.provider.IItemPropertySource;
21import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
22import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
23import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
24import org.eclipse.emf.edit.provider.ViewerNotification;
25 
26import de.uka.ipd.sdq.featuremodel.FeatureGroup;
27import de.uka.ipd.sdq.featuremodel.featuremodelFactory;
28import de.uka.ipd.sdq.featuremodel.featuremodelPackage;
29 
30/**
31 * This is the item provider adapter for a {@link de.uka.ipd.sdq.featuremodel.FeatureGroup} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class FeatureGroupItemProvider
37        extends ChildRelationItemProvider
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 FeatureGroupItemProvider(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                        addMinPropertyDescriptor(object);
66                        addMaxPropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Min feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addMinPropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_FeatureGroup_min_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_FeatureGroup_min_feature", "_UI_FeatureGroup_type"),
84                                 featuremodelPackage.Literals.FEATURE_GROUP__MIN,
85                                 true,
86                                 false,
87                                 false,
88                                 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This adds a property descriptor for the Max feature.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        protected void addMaxPropertyDescriptor(Object object) {
100                itemPropertyDescriptors.add
101                        (createItemPropertyDescriptor
102                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
103                                 getResourceLocator(),
104                                 getString("_UI_FeatureGroup_max_feature"),
105                                 getString("_UI_PropertyDescriptor_description", "_UI_FeatureGroup_max_feature", "_UI_FeatureGroup_type"),
106                                 featuremodelPackage.Literals.FEATURE_GROUP__MAX,
107                                 true,
108                                 false,
109                                 false,
110                                 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
111                                 null,
112                                 null));
113        }
114 
115        /**
116         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
117         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
118         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
119         * <!-- begin-user-doc -->
120         * <!-- end-user-doc -->
121         * @generated
122         */
123        @Override
124        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
125                if (childrenFeatures == null) {
126                        super.getChildrenFeatures(object);
127                        childrenFeatures.add(featuremodelPackage.Literals.FEATURE_GROUP__CHILDREN);
128                }
129                return childrenFeatures;
130        }
131 
132        /**
133         * <!-- begin-user-doc -->
134         * <!-- end-user-doc -->
135         * @generated
136         */
137        @Override
138        protected EStructuralFeature getChildFeature(Object object, Object child) {
139                // Check the type of the specified child object and return the proper feature to use for
140                // adding (see {@link AddCommand}) it as a child.
141 
142                return super.getChildFeature(object, child);
143        }
144 
145        /**
146         * This returns FeatureGroup.gif.
147         * <!-- begin-user-doc -->
148         * <!-- end-user-doc -->
149         * @generated
150         */
151        @Override
152        public Object getImage(Object object) {
153                return overlayImage(object, getResourceLocator().getImage("full/obj16/FeatureGroup"));
154        }
155 
156        /**
157         * This returns the label text for the adapted class.
158         * <!-- begin-user-doc -->
159         * <!-- end-user-doc -->
160         * @generated
161         */
162        @Override
163        public String getText(Object object) {
164                FeatureGroup featureGroup = (FeatureGroup)object;
165                return getString("_UI_FeatureGroup_type") + " " + featureGroup.getMin();
166        }
167 
168        /**
169         * This handles model notifications by calling {@link #updateChildren} to update any cached
170         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
171         * <!-- begin-user-doc -->
172         * <!-- end-user-doc -->
173         * @generated
174         */
175        @Override
176        public void notifyChanged(Notification notification) {
177                updateChildren(notification);
178 
179                switch (notification.getFeatureID(FeatureGroup.class)) {
180                        case featuremodelPackage.FEATURE_GROUP__MIN:
181                        case featuremodelPackage.FEATURE_GROUP__MAX:
182                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
183                                return;
184                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
185                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
186                                return;
187                }
188                super.notifyChanged(notification);
189        }
190 
191        /**
192         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
193         * that can be created under this object.
194         * <!-- begin-user-doc -->
195         * <!-- end-user-doc -->
196         * @generated
197         */
198        @Override
199        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
200                super.collectNewChildDescriptors(newChildDescriptors, object);
201 
202                newChildDescriptors.add
203                        (createChildParameter
204                                (featuremodelPackage.Literals.FEATURE_GROUP__CHILDREN,
205                                 featuremodelFactory.eINSTANCE.createFeature()));
206        }
207 
208}

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