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

COVERAGE SUMMARY FOR SOURCE FILE [RandomVariableItemProvider.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RandomVariableItemProvider0%   (0/1)0%   (0/9)0%   (0/139)0%   (0/49)
RandomVariableItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addExpressionPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addSpecificationPropertyDescriptor (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.stoex.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.ItemProviderAdapter;
25import org.eclipse.emf.edit.provider.ViewerNotification;
26 
27import de.uka.ipd.sdq.stoex.RandomVariable;
28import de.uka.ipd.sdq.stoex.StoexPackage;
29 
30/**
31 * This is the item provider adapter for a {@link de.uka.ipd.sdq.stoex.RandomVariable} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class RandomVariableItemProvider
37        extends ItemProviderAdapter
38        implements        
39                IEditingDomainItemProvider,        
40                IStructuredItemContentProvider,        
41                ITreeItemContentProvider,        
42                IItemLabelProvider,        
43                IItemPropertySource {
44        /**
45         * <!-- begin-user-doc -->
46         * <!-- end-user-doc -->
47         * @generated
48         */
49        public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe";
50 
51        /**
52         * This constructs an instance from a factory and a notifier.
53         * <!-- begin-user-doc -->
54         * <!-- end-user-doc -->
55         * @generated
56         */
57        public RandomVariableItemProvider(AdapterFactory adapterFactory) {
58                super(adapterFactory);
59        }
60 
61        /**
62         * This returns the property descriptors for the adapted class.
63         * <!-- begin-user-doc -->
64         * <!-- end-user-doc -->
65         * @generated
66         */
67        @Override
68        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
69                if (itemPropertyDescriptors == null) {
70                        super.getPropertyDescriptors(object);
71 
72                        addSpecificationPropertyDescriptor(object);
73                        addExpressionPropertyDescriptor(object);
74                }
75                return itemPropertyDescriptors;
76        }
77 
78        /**
79         * This adds a property descriptor for the Specification feature.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        protected void addSpecificationPropertyDescriptor(Object object) {
85                itemPropertyDescriptors.add
86                        (createItemPropertyDescriptor
87                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
88                                 getResourceLocator(),
89                                 getString("_UI_RandomVariable_specification_feature"),
90                                 getString("_UI_PropertyDescriptor_description", "_UI_RandomVariable_specification_feature", "_UI_RandomVariable_type"),
91                                 StoexPackage.Literals.RANDOM_VARIABLE__SPECIFICATION,
92                                 true,
93                                 false,
94                                 false,
95                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
96                                 null,
97                                 null));
98        }
99 
100        /**
101         * This adds a property descriptor for the Expression feature.
102         * <!-- begin-user-doc -->
103         * <!-- end-user-doc -->
104         * @generated
105         */
106        protected void addExpressionPropertyDescriptor(Object object) {
107                itemPropertyDescriptors.add
108                        (createItemPropertyDescriptor
109                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
110                                 getResourceLocator(),
111                                 getString("_UI_RandomVariable_expression_feature"),
112                                 getString("_UI_PropertyDescriptor_description", "_UI_RandomVariable_expression_feature", "_UI_RandomVariable_type"),
113                                 StoexPackage.Literals.RANDOM_VARIABLE__EXPRESSION,
114                                 true,
115                                 false,
116                                 true,
117                                 null,
118                                 null,
119                                 null));
120        }
121 
122        /**
123         * This returns RandomVariable.gif.
124         * <!-- begin-user-doc -->
125         * <!-- end-user-doc -->
126         * @generated
127         */
128        @Override
129        public Object getImage(Object object) {
130                return overlayImage(object, getResourceLocator().getImage("full/obj16/RandomVariable"));
131        }
132 
133        /**
134         * This returns the label text for the adapted class.
135         * <!-- begin-user-doc -->
136         * <!-- end-user-doc -->
137         * @generated
138         */
139        @Override
140        public String getText(Object object) {
141                String label = ((RandomVariable)object).getSpecification();
142                return label == null || label.length() == 0 ?
143                        getString("_UI_RandomVariable_type") :
144                        getString("_UI_RandomVariable_type") + " " + label;
145        }
146 
147        /**
148         * This handles model notifications by calling {@link #updateChildren} to update any cached
149         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        public void notifyChanged(Notification notification) {
156                updateChildren(notification);
157 
158                switch (notification.getFeatureID(RandomVariable.class)) {
159                        case StoexPackage.RANDOM_VARIABLE__SPECIFICATION:
160                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
161                                return;
162                }
163                super.notifyChanged(notification);
164        }
165 
166        /**
167         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
168         * that can be created under this object.
169         * <!-- begin-user-doc -->
170         * <!-- end-user-doc -->
171         * @generated
172         */
173        @Override
174        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
175                super.collectNewChildDescriptors(newChildDescriptors, object);
176        }
177 
178        /**
179         * Return the resource locator for this item provider's resources.
180         * <!-- begin-user-doc -->
181         * <!-- end-user-doc -->
182         * @generated
183         */
184        @Override
185        public ResourceLocator getResourceLocator() {
186                return StoexEditPlugin.INSTANCE;
187        }
188 
189}

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