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 [VariableUsageParameterItemProvider.java]

nameclass, %method, %block, %line, %
VariableUsageParameterItemProvider.java0%   (0/1)0%   (0/12)0%   (0/304)0%   (0/107)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VariableUsageParameterItemProvider0%   (0/1)0%   (0/12)0%   (0/304)0%   (0/107)
$SWITCH_TABLE$de$uka$ipd$sdq$sensitivity$VariableUsageType (): int [] 0%   (0/1)0%   (0/27)0%   (0/1)
VariableUsageParameterItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addBasicComponent__VariableUsageParameterPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addEntryLevelSystemCall__VariableUsageParameterPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addVariableCharacterisationType__VariableUsageParameterPropertyDescriptor (Ob... 0%   (0/1)0%   (0/28)0%   (0/14)
addVariableNamePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addVariableUsageType__VariableUsageParameterPropertyDescriptor (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/25)0%   (0/8)
getText (Object): String 0%   (0/1)0%   (0/73)0%   (0/17)
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 de.uka.ipd.sdq.sensitivity.SensitivityPackage;
11import de.uka.ipd.sdq.sensitivity.VariableUsageParameter;
12 
13import java.util.Collection;
14import java.util.List;
15 
16import org.eclipse.emf.common.notify.AdapterFactory;
17import org.eclipse.emf.common.notify.Notification;
18 
19import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
20import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
21import org.eclipse.emf.edit.provider.IItemLabelProvider;
22import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.IItemPropertySource;
24import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
25import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
26import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
27import org.eclipse.emf.edit.provider.ViewerNotification;
28 
29/**
30 * This is the item provider adapter for a {@link de.uka.ipd.sdq.sensitivity.VariableUsageParameter} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class VariableUsageParameterItemProvider
36        extends SingleSensitivityParameterItemProvider
37        implements
38                IEditingDomainItemProvider,
39                IStructuredItemContentProvider,
40                ITreeItemContentProvider,
41                IItemLabelProvider,
42                IItemPropertySource {
43        /**
44         * This constructs an instance from a factory and a notifier.
45         * <!-- begin-user-doc -->
46         * <!-- end-user-doc -->
47         * @generated
48         */
49        public VariableUsageParameterItemProvider(AdapterFactory adapterFactory) {
50                super(adapterFactory);
51        }
52 
53        /**
54         * This returns the property descriptors for the adapted class.
55         * <!-- begin-user-doc -->
56         * <!-- end-user-doc -->
57         * @generated
58         */
59        @Override
60        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
61                if (itemPropertyDescriptors == null) {
62                        super.getPropertyDescriptors(object);
63 
64                        addVariableNamePropertyDescriptor(object);
65                        addEntryLevelSystemCall__VariableUsageParameterPropertyDescriptor(object);
66                        addVariableCharacterisationType__VariableUsageParameterPropertyDescriptor(object);
67                        addVariableUsageType__VariableUsageParameterPropertyDescriptor(object);
68                        addBasicComponent__VariableUsageParameterPropertyDescriptor(object);
69                }
70                return itemPropertyDescriptors;
71        }
72 
73        /**
74         * This adds a property descriptor for the Variable Name feature.
75         * <!-- begin-user-doc -->
76         * <!-- end-user-doc -->
77         * @generated
78         */
79        protected void addVariableNamePropertyDescriptor(Object object) {
80                itemPropertyDescriptors.add
81                        (createItemPropertyDescriptor
82                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
83                                 getResourceLocator(),
84                                 getString("_UI_VariableUsageParameter_VariableName_feature"),
85                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableUsageParameter_VariableName_feature", "_UI_VariableUsageParameter_type"),
86                                 SensitivityPackage.Literals.VARIABLE_USAGE_PARAMETER__VARIABLE_NAME,
87                                 true,
88                                 false,
89                                 false,
90                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
91                                 null,
92                                 null));
93        }
94 
95        /**
96         * This adds a property descriptor for the Entry Level System Call Variable Usage Parameter feature.
97         * <!-- begin-user-doc -->
98         * <!-- end-user-doc -->
99         * @generated
100         */
101        protected void addEntryLevelSystemCall__VariableUsageParameterPropertyDescriptor(Object object) {
102                itemPropertyDescriptors.add
103                        (createItemPropertyDescriptor
104                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
105                                 getResourceLocator(),
106                                 getString("_UI_VariableUsageParameter_entryLevelSystemCall__VariableUsageParameter_feature"),
107                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableUsageParameter_entryLevelSystemCall__VariableUsageParameter_feature", "_UI_VariableUsageParameter_type"),
108                                 SensitivityPackage.Literals.VARIABLE_USAGE_PARAMETER__ENTRY_LEVEL_SYSTEM_CALL_VARIABLE_USAGE_PARAMETER,
109                                 true,
110                                 false,
111                                 true,
112                                 null,
113                                 null,
114                                 null));
115        }
116 
117        /**
118         * This adds a property descriptor for the Variable Characterisation Type Variable Usage Parameter feature.
119         * <!-- begin-user-doc -->
120         * <!-- end-user-doc -->
121         * @generated
122         */
123        protected void addVariableCharacterisationType__VariableUsageParameterPropertyDescriptor(Object object) {
124                itemPropertyDescriptors.add
125                        (createItemPropertyDescriptor
126                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
127                                 getResourceLocator(),
128                                 getString("_UI_VariableUsageParameter_variableCharacterisationType__VariableUsageParameter_feature"),
129                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableUsageParameter_variableCharacterisationType__VariableUsageParameter_feature", "_UI_VariableUsageParameter_type"),
130                                 SensitivityPackage.Literals.VARIABLE_USAGE_PARAMETER__VARIABLE_CHARACTERISATION_TYPE_VARIABLE_USAGE_PARAMETER,
131                                 true,
132                                 false,
133                                 false,
134                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
135                                 null,
136                                 null));
137        }
138 
139        /**
140         * This adds a property descriptor for the Variable Usage Type Variable Usage Parameter feature.
141         * <!-- begin-user-doc -->
142         * <!-- end-user-doc -->
143         * @generated
144         */
145        protected void addVariableUsageType__VariableUsageParameterPropertyDescriptor(Object object) {
146                itemPropertyDescriptors.add
147                        (createItemPropertyDescriptor
148                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
149                                 getResourceLocator(),
150                                 getString("_UI_VariableUsageParameter_variableUsageType__VariableUsageParameter_feature"),
151                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableUsageParameter_variableUsageType__VariableUsageParameter_feature", "_UI_VariableUsageParameter_type"),
152                                 SensitivityPackage.Literals.VARIABLE_USAGE_PARAMETER__VARIABLE_USAGE_TYPE_VARIABLE_USAGE_PARAMETER,
153                                 true,
154                                 false,
155                                 false,
156                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
157                                 null,
158                                 null));
159        }
160 
161        /**
162         * This adds a property descriptor for the Basic Component Variable Usage Parameter feature.
163         * <!-- begin-user-doc -->
164         * <!-- end-user-doc -->
165         * @generated
166         */
167        protected void addBasicComponent__VariableUsageParameterPropertyDescriptor(Object object) {
168                itemPropertyDescriptors.add
169                        (createItemPropertyDescriptor
170                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
171                                 getResourceLocator(),
172                                 getString("_UI_VariableUsageParameter_basicComponent__VariableUsageParameter_feature"),
173                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableUsageParameter_basicComponent__VariableUsageParameter_feature", "_UI_VariableUsageParameter_type"),
174                                 SensitivityPackage.Literals.VARIABLE_USAGE_PARAMETER__BASIC_COMPONENT_VARIABLE_USAGE_PARAMETER,
175                                 true,
176                                 false,
177                                 true,
178                                 null,
179                                 null,
180                                 null));
181        }
182 
183        /**
184         * This returns VariableUsageParameter.gif.
185         * <!-- begin-user-doc -->
186         * <!-- end-user-doc -->
187         * @generated
188         */
189        @Override
190        public Object getImage(Object object) {
191                return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableUsageParameter"));
192        }
193 
194        /**
195         * This returns the label text for the adapted class.
196         * <!-- begin-user-doc -->
197         * <!-- end-user-doc -->
198         * @generated not
199         */
200        @Override
201        public String getText(Object object) {                
202                String paramName = "UNSPECIFIED";
203                try {
204                        switch(((VariableUsageParameter)object).
205                                        getVariableUsageType__VariableUsageParameter()) {
206                        case SYSTEM_CALL_INPUT:
207                                paramName = ((VariableUsageParameter)object).
208                                        getEntryLevelSystemCall__VariableUsageParameter().getEntityName();
209                                break;
210                        case COMPONENT_CONFIGURATION:
211                                paramName = ((VariableUsageParameter)object).
212                                        getBasicComponent__VariableUsageParameter().getEntityName();
213                                break;
214                        }
215                } catch(Exception e) {}
216                String inputCharacterisation = ((VariableUsageParameter)object).
217                        getVariableName() + "." + ((VariableUsageParameter)object).
218                        getVariableCharacterisationType__VariableUsageParameter().toString();
219                return ((VariableUsageParameter)object).getEntityName()
220                        + " (" + paramName + "/" + inputCharacterisation + ")"
221                        + " [ID: " + ((VariableUsageParameter)object).getId() + "]"
222                        + " <" + getString("_UI_VariableUsageParameter_type") + ">";
223        }
224 
225        /**
226         * This handles model notifications by calling {@link #updateChildren} to update any cached
227         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
228         * <!-- begin-user-doc -->
229         * <!-- end-user-doc -->
230         * @generated
231         */
232        @Override
233        public void notifyChanged(Notification notification) {
234                updateChildren(notification);
235 
236                switch (notification.getFeatureID(VariableUsageParameter.class)) {
237                        case SensitivityPackage.VARIABLE_USAGE_PARAMETER__VARIABLE_NAME:
238                        case SensitivityPackage.VARIABLE_USAGE_PARAMETER__VARIABLE_CHARACTERISATION_TYPE_VARIABLE_USAGE_PARAMETER:
239                        case SensitivityPackage.VARIABLE_USAGE_PARAMETER__VARIABLE_USAGE_TYPE_VARIABLE_USAGE_PARAMETER:
240                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
241                                return;
242                }
243                super.notifyChanged(notification);
244        }
245 
246        /**
247         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
248         * that can be created under this object.
249         * <!-- begin-user-doc -->
250         * <!-- end-user-doc -->
251         * @generated
252         */
253        @Override
254        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
255                super.collectNewChildDescriptors(newChildDescriptors, object);
256        }
257 
258}

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