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

COVERAGE SUMMARY FOR SOURCE FILE [QualityPropertyItemProvider.java]

nameclass, %method, %block, %line, %
QualityPropertyItemProvider.java0%   (0/1)0%   (0/7)0%   (0/107)0%   (0/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class QualityPropertyItemProvider0%   (0/1)0%   (0/7)0%   (0/107)0%   (0/34)
QualityPropertyItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addQualityValuePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/5)0%   (0/2)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/13)0%   (0/4)
getResourceLocator (): ResourceLocator 0%   (0/1)0%   (0/2)0%   (0/1)
getText (Object): String 0%   (0/1)0%   (0/33)0%   (0/5)
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.designdecision.QualityProperties.provider;
8 
9 
10import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.QualityPropertiesPackage;
11import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.QualityProperty;
12 
13import de.uka.ipd.sdq.pcm.designdecision.provider.DesignDecisionEditPlugin;
14 
15import java.util.Collection;
16import java.util.List;
17 
18import org.eclipse.emf.common.notify.AdapterFactory;
19import org.eclipse.emf.common.notify.Notification;
20 
21import org.eclipse.emf.common.util.ResourceLocator;
22 
23import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
24import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
25import org.eclipse.emf.edit.provider.IItemLabelProvider;
26import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
27import org.eclipse.emf.edit.provider.IItemPropertySource;
28import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
29import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
30import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
31import org.eclipse.emf.edit.provider.ItemProviderAdapter;
32import org.eclipse.emf.edit.provider.ViewerNotification;
33 
34/**
35 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.designdecision.QualityProperties.QualityProperty} object.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @generated
39 */
40public class QualityPropertyItemProvider
41        extends ItemProviderAdapter
42        implements
43                IEditingDomainItemProvider,
44                IStructuredItemContentProvider,
45                ITreeItemContentProvider,
46                IItemLabelProvider,
47                IItemPropertySource {
48        /**
49         * This constructs an instance from a factory and a notifier.
50         * <!-- begin-user-doc -->
51         * <!-- end-user-doc -->
52         * @generated
53         */
54        public QualityPropertyItemProvider(AdapterFactory adapterFactory) {
55                super(adapterFactory);
56        }
57 
58        /**
59         * This returns the property descriptors for the adapted class.
60         * <!-- begin-user-doc -->
61         * <!-- end-user-doc -->
62         * @generated
63         */
64        @Override
65        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
66                if (itemPropertyDescriptors == null) {
67                        super.getPropertyDescriptors(object);
68 
69                        addQualityValuePropertyDescriptor(object);
70                }
71                return itemPropertyDescriptors;
72        }
73 
74        /**
75         * This adds a property descriptor for the Quality Value feature.
76         * <!-- begin-user-doc -->
77         * <!-- end-user-doc -->
78         * @generated
79         */
80        protected void addQualityValuePropertyDescriptor(Object object) {
81                itemPropertyDescriptors.add
82                        (createItemPropertyDescriptor
83                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
84                                 getResourceLocator(),
85                                 getString("_UI_QualityProperty_qualityValue_feature"),
86                                 getString("_UI_PropertyDescriptor_description", "_UI_QualityProperty_qualityValue_feature", "_UI_QualityProperty_type"),
87                                 QualityPropertiesPackage.Literals.QUALITY_PROPERTY__QUALITY_VALUE,
88                                 true,
89                                 false,
90                                 false,
91                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
92                                 null,
93                                 null));
94        }
95 
96        /**
97         * This returns the label text for the adapted class.
98         * <!-- begin-user-doc -->
99         * <!-- end-user-doc -->
100         * @generated
101         */
102        @Override
103        public String getText(Object object) {
104                Object labelValue = ((QualityProperty)object).getQualityValue();
105                String label = labelValue == null ? null : labelValue.toString();
106                return label == null || label.length() == 0 ?
107                        getString("_UI_QualityProperty_type") :
108                        getString("_UI_QualityProperty_type") + " " + label;
109        }
110 
111        /**
112         * This handles model notifications by calling {@link #updateChildren} to update any cached
113         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
114         * <!-- begin-user-doc -->
115         * <!-- end-user-doc -->
116         * @generated
117         */
118        @Override
119        public void notifyChanged(Notification notification) {
120                updateChildren(notification);
121 
122                switch (notification.getFeatureID(QualityProperty.class)) {
123                        case QualityPropertiesPackage.QUALITY_PROPERTY__QUALITY_VALUE:
124                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
125                                return;
126                }
127                super.notifyChanged(notification);
128        }
129 
130        /**
131         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
132         * that can be created under this object.
133         * <!-- begin-user-doc -->
134         * <!-- end-user-doc -->
135         * @generated
136         */
137        @Override
138        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
139                super.collectNewChildDescriptors(newChildDescriptors, object);
140        }
141 
142        /**
143         * Return the resource locator for this item provider's resources.
144         * <!-- begin-user-doc -->
145         * <!-- end-user-doc -->
146         * @generated
147         */
148        @Override
149        public ResourceLocator getResourceLocator() {
150                return DesignDecisionEditPlugin.INSTANCE;
151        }
152 
153}

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