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

COVERAGE SUMMARY FOR SOURCE FILE [DoubleParameterSequenceItemProvider.java]

nameclass, %method, %block, %line, %
DoubleParameterSequenceItemProvider.java0%   (0/1)0%   (0/7)0%   (0/125)0%   (0/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DoubleParameterSequenceItemProvider0%   (0/1)0%   (0/7)0%   (0/125)0%   (0/34)
DoubleParameterSequenceItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addDoubleValuesPropertyDescriptor (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/13)0%   (0/4)
getText (Object): String 0%   (0/1)0%   (0/45)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.sensitivity.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.edit.provider.ComposeableAdapterFactory;
16import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
17import org.eclipse.emf.edit.provider.IItemLabelProvider;
18import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
19import org.eclipse.emf.edit.provider.IItemPropertySource;
20import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
21import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
22import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.ViewerNotification;
24 
25import de.uka.ipd.sdq.sensitivity.DoubleParameterSequence;
26import de.uka.ipd.sdq.sensitivity.SensitivityPackage;
27 
28/**
29 * This is the item provider adapter for a {@link de.uka.ipd.sdq.sensitivity.DoubleParameterSequence} object.
30 * <!-- begin-user-doc -->
31 * <!-- end-user-doc -->
32 * @generated
33 */
34public class DoubleParameterSequenceItemProvider
35        extends DoubleParameterVariationItemProvider
36        implements
37                IEditingDomainItemProvider,
38                IStructuredItemContentProvider,
39                ITreeItemContentProvider,
40                IItemLabelProvider,
41                IItemPropertySource {
42        /**
43         * This constructs an instance from a factory and a notifier.
44         * <!-- begin-user-doc -->
45         * <!-- end-user-doc -->
46         * @generated
47         */
48        public DoubleParameterSequenceItemProvider(AdapterFactory adapterFactory) {
49                super(adapterFactory);
50        }
51 
52        /**
53         * This returns the property descriptors for the adapted class.
54         * <!-- begin-user-doc -->
55         * <!-- end-user-doc -->
56         * @generated
57         */
58        @Override
59        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
60                if (itemPropertyDescriptors == null) {
61                        super.getPropertyDescriptors(object);
62 
63                        addDoubleValuesPropertyDescriptor(object);
64                }
65                return itemPropertyDescriptors;
66        }
67 
68        /**
69         * This adds a property descriptor for the Double Values feature.
70         * <!-- begin-user-doc -->
71         * <!-- end-user-doc -->
72         * @generated
73         */
74        protected void addDoubleValuesPropertyDescriptor(Object object) {
75                itemPropertyDescriptors.add
76                        (createItemPropertyDescriptor
77                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
78                                 getResourceLocator(),
79                                 getString("_UI_DoubleParameterSequence_doubleValues_feature"),
80                                 getString("_UI_PropertyDescriptor_description", "_UI_DoubleParameterSequence_doubleValues_feature", "_UI_DoubleParameterSequence_type"),
81                                 SensitivityPackage.Literals.DOUBLE_PARAMETER_SEQUENCE__DOUBLE_VALUES,
82                                 true,
83                                 false,
84                                 false,
85                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
86                                 null,
87                                 null));
88        }
89 
90        /**
91         * This returns DoubleParameterSequence.gif.
92         * <!-- begin-user-doc -->
93         * <!-- end-user-doc -->
94         * @generated
95         */
96        @Override
97        public Object getImage(Object object) {
98                return overlayImage(object, getResourceLocator().getImage("full/obj16/DoubleParameterSequence"));
99        }
100 
101        /**
102         * This returns the label text for the adapted class.
103         * <!-- begin-user-doc -->
104         * <!-- end-user-doc -->
105         * @generated not
106         */
107        @Override
108        public String getText(Object object) {
109                String doubleSequence = "UNSPECIFIED";
110                try {
111                        org.eclipse.emf.common.util.EList<Double> values = ((DoubleParameterSequence)object).getDoubleValues();
112                        doubleSequence = values.get(0).toString() + " ... " + values.get(values.size() - 1).toString();
113                } catch(Exception e) {}
114                return doubleSequence + " <" + getString("_UI_DoubleParameterSequence_type") + ">";
115        }
116 
117        /**
118         * This handles model notifications by calling {@link #updateChildren} to update any cached
119         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
120         * <!-- begin-user-doc -->
121         * <!-- end-user-doc -->
122         * @generated
123         */
124        @Override
125        public void notifyChanged(Notification notification) {
126                updateChildren(notification);
127 
128                switch (notification.getFeatureID(DoubleParameterSequence.class)) {
129                        case SensitivityPackage.DOUBLE_PARAMETER_SEQUENCE__DOUBLE_VALUES:
130                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
131                                return;
132                }
133                super.notifyChanged(notification);
134        }
135 
136        /**
137         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
138         * that can be created under this object.
139         * <!-- begin-user-doc -->
140         * <!-- end-user-doc -->
141         * @generated
142         */
143        @Override
144        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
145                super.collectNewChildDescriptors(newChildDescriptors, object);
146        }
147 
148}

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