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

COVERAGE SUMMARY FOR SOURCE FILE [AttributeValueItemProvider.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AttributeValueItemProvider0%   (0/1)0%   (0/9)0%   (0/139)0%   (0/49)
AttributeValueItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addConfignodePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addValuePropertyDescriptor (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.featureconfig.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.common.util.ResourceLocator;
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.featureconfig.AttributeValue;
27import de.uka.ipd.sdq.featureconfig.featureconfigPackage;
28import de.uka.ipd.sdq.featuremodel.provider.NamedElementItemProvider;
29 
30/**
31 * This is the item provider adapter for a {@link de.uka.ipd.sdq.featureconfig.AttributeValue} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class AttributeValueItemProvider
37        extends NamedElementItemProvider
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 AttributeValueItemProvider(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                        addValuePropertyDescriptor(object);
66                        addConfignodePropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Value feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addValuePropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_AttributeValue_value_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_AttributeValue_value_feature", "_UI_AttributeValue_type"),
84                                 featureconfigPackage.Literals.ATTRIBUTE_VALUE__VALUE,
85                                 true,
86                                 false,
87                                 false,
88                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This adds a property descriptor for the Confignode feature.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        protected void addConfignodePropertyDescriptor(Object object) {
100                itemPropertyDescriptors.add
101                        (createItemPropertyDescriptor
102                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
103                                 getResourceLocator(),
104                                 getString("_UI_AttributeValue_confignode_feature"),
105                                 getString("_UI_PropertyDescriptor_description", "_UI_AttributeValue_confignode_feature", "_UI_AttributeValue_type"),
106                                 featureconfigPackage.Literals.ATTRIBUTE_VALUE__CONFIGNODE,
107                                 true,
108                                 false,
109                                 true,
110                                 null,
111                                 null,
112                                 null));
113        }
114 
115        /**
116         * This returns AttributeValue.gif.
117         * <!-- begin-user-doc -->
118         * <!-- end-user-doc -->
119         * @generated
120         */
121        @Override
122        public Object getImage(Object object) {
123                return overlayImage(object, getResourceLocator().getImage("full/obj16/AttributeValue"));
124        }
125 
126        /**
127         * This returns the label text for the adapted class.
128         * <!-- begin-user-doc -->
129         * <!-- end-user-doc -->
130         * @generated
131         */
132        @Override
133        public String getText(Object object) {
134                String label = ((AttributeValue)object).getName();
135                return label == null || label.length() == 0 ?
136                        getString("_UI_AttributeValue_type") :
137                        getString("_UI_AttributeValue_type") + " " + label;
138        }
139 
140        /**
141         * This handles model notifications by calling {@link #updateChildren} to update any cached
142         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
143         * <!-- begin-user-doc -->
144         * <!-- end-user-doc -->
145         * @generated
146         */
147        @Override
148        public void notifyChanged(Notification notification) {
149                updateChildren(notification);
150 
151                switch (notification.getFeatureID(AttributeValue.class)) {
152                        case featureconfigPackage.ATTRIBUTE_VALUE__VALUE:
153                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
154                                return;
155                }
156                super.notifyChanged(notification);
157        }
158 
159        /**
160         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
161         * that can be created under this object.
162         * <!-- begin-user-doc -->
163         * <!-- end-user-doc -->
164         * @generated
165         */
166        @Override
167        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
168                super.collectNewChildDescriptors(newChildDescriptors, object);
169        }
170 
171        /**
172         * Return the resource locator for this item provider's resources.
173         * <!-- begin-user-doc -->
174         * <!-- end-user-doc -->
175         * @generated
176         */
177        @Override
178        public ResourceLocator getResourceLocator() {
179                return FeatureConfigEditPlugin.INSTANCE;
180        }
181 
182}

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