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

COVERAGE SUMMARY FOR SOURCE FILE [TransitionItemProvider.java]

nameclass, %method, %block, %line, %
TransitionItemProvider.java0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/63)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TransitionItemProvider0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/63)
TransitionItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addFromStatePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addProbabilityPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addToStatePropertyDescriptor (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/19)0%   (0/6)
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.markov.provider;
8 
9 
10import de.uka.ipd.sdq.markov.MarkovPackage;
11import de.uka.ipd.sdq.markov.Transition;
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.markov.Transition} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class TransitionItemProvider
36        extends EntityItemProvider
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 TransitionItemProvider(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                        addProbabilityPropertyDescriptor(object);
65                        addFromStatePropertyDescriptor(object);
66                        addToStatePropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Probability feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addProbabilityPropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_Transition_probability_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_Transition_probability_feature", "_UI_Transition_type"),
84                                 MarkovPackage.Literals.TRANSITION__PROBABILITY,
85                                 true,
86                                 false,
87                                 false,
88                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This adds a property descriptor for the From State feature.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        protected void addFromStatePropertyDescriptor(Object object) {
100                itemPropertyDescriptors.add
101                        (createItemPropertyDescriptor
102                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
103                                 getResourceLocator(),
104                                 getString("_UI_Transition_fromState_feature"),
105                                 getString("_UI_PropertyDescriptor_description", "_UI_Transition_fromState_feature", "_UI_Transition_type"),
106                                 MarkovPackage.Literals.TRANSITION__FROM_STATE,
107                                 true,
108                                 false,
109                                 true,
110                                 null,
111                                 null,
112                                 null));
113        }
114 
115        /**
116         * This adds a property descriptor for the To State feature.
117         * <!-- begin-user-doc -->
118         * <!-- end-user-doc -->
119         * @generated
120         */
121        protected void addToStatePropertyDescriptor(Object object) {
122                itemPropertyDescriptors.add
123                        (createItemPropertyDescriptor
124                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
125                                 getResourceLocator(),
126                                 getString("_UI_Transition_toState_feature"),
127                                 getString("_UI_PropertyDescriptor_description", "_UI_Transition_toState_feature", "_UI_Transition_type"),
128                                 MarkovPackage.Literals.TRANSITION__TO_STATE,
129                                 true,
130                                 false,
131                                 true,
132                                 null,
133                                 null,
134                                 null));
135        }
136 
137        /**
138         * This returns Transition.gif.
139         * <!-- begin-user-doc -->
140         * <!-- end-user-doc -->
141         * @generated
142         */
143        @Override
144        public Object getImage(Object object) {
145                return overlayImage(object, getResourceLocator().getImage("full/obj16/Transition"));
146        }
147 
148        /**
149         * This returns the label text for the adapted class.
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        public String getText(Object object) {
156                String label = ((Transition)object).getName();
157                return label == null || label.length() == 0 ?
158                        getString("_UI_Transition_type") :
159                        getString("_UI_Transition_type") + " " + label;
160        }
161 
162        /**
163         * This handles model notifications by calling {@link #updateChildren} to update any cached
164         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
165         * <!-- begin-user-doc -->
166         * <!-- end-user-doc -->
167         * @generated
168         */
169        @Override
170        public void notifyChanged(Notification notification) {
171                updateChildren(notification);
172 
173                switch (notification.getFeatureID(Transition.class)) {
174                        case MarkovPackage.TRANSITION__PROBABILITY:
175                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
176                                return;
177                }
178                super.notifyChanged(notification);
179        }
180 
181        /**
182         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
183         * that can be created under this object.
184         * <!-- begin-user-doc -->
185         * <!-- end-user-doc -->
186         * @generated
187         */
188        @Override
189        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
190                super.collectNewChildDescriptors(newChildDescriptors, object);
191        }
192 
193}

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