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

COVERAGE SUMMARY FOR SOURCE FILE [ExponentialDistributionItemProvider.java]

nameclass, %method, %block, %line, %
ExponentialDistributionItemProvider.java0%   (0/1)0%   (0/7)0%   (0/106)0%   (0/33)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ExponentialDistributionItemProvider0%   (0/1)0%   (0/7)0%   (0/106)0%   (0/33)
ExponentialDistributionItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addRatePropertyDescriptor (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/26)0%   (0/4)
notifyChanged (Notification): void 0%   (0/1)0%   (0/22)0%   (0/6)

1/**
2 * Copyright 2007-2009, SDQ, IPD, U Karlsruhe
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.probfunction.provider;
7 
8 
9import java.util.Collection;
10import java.util.List;
11 
12import org.eclipse.emf.common.notify.AdapterFactory;
13import org.eclipse.emf.common.notify.Notification;
14import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
15import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
16import org.eclipse.emf.edit.provider.IItemLabelProvider;
17import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
18import org.eclipse.emf.edit.provider.IItemPropertySource;
19import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
20import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
21import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
22import org.eclipse.emf.edit.provider.ViewerNotification;
23 
24import de.uka.ipd.sdq.probfunction.ExponentialDistribution;
25import de.uka.ipd.sdq.probfunction.ProbfunctionPackage;
26 
27/**
28 * This is the item provider adapter for a {@link de.uka.ipd.sdq.probfunction.ExponentialDistribution} object.
29 * <!-- begin-user-doc -->
30 * <!-- end-user-doc -->
31 * @generated
32 */
33public class ExponentialDistributionItemProvider
34        extends ContinuousPDFItemProvider
35        implements
36                IEditingDomainItemProvider,
37                IStructuredItemContentProvider,
38                ITreeItemContentProvider,
39                IItemLabelProvider,
40                IItemPropertySource {
41        /**
42         * <!-- begin-user-doc -->
43         * <!-- end-user-doc -->
44         * @generated
45         */
46        public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe";
47 
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 ExponentialDistributionItemProvider(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                        addRatePropertyDescriptor(object);
70                }
71                return itemPropertyDescriptors;
72        }
73 
74        /**
75         * This adds a property descriptor for the Rate feature.
76         * <!-- begin-user-doc -->
77         * <!-- end-user-doc -->
78         * @generated
79         */
80        protected void addRatePropertyDescriptor(Object object) {
81                itemPropertyDescriptors.add
82                        (createItemPropertyDescriptor
83                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
84                                 getResourceLocator(),
85                                 getString("_UI_ExponentialDistribution_rate_feature"),
86                                 getString("_UI_PropertyDescriptor_description", "_UI_ExponentialDistribution_rate_feature", "_UI_ExponentialDistribution_type"),
87                                 ProbfunctionPackage.Literals.EXPONENTIAL_DISTRIBUTION__RATE,
88                                 true,
89                                 false,
90                                 false,
91                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
92                                 null,
93                                 null));
94        }
95 
96        /**
97         * This returns ExponentialDistribution.gif.
98         * <!-- begin-user-doc -->
99         * <!-- end-user-doc -->
100         * @generated
101         */
102        @Override
103        public Object getImage(Object object) {
104                return overlayImage(object, getResourceLocator().getImage("full/obj16/ExponentialDistribution"));
105        }
106 
107        /**
108         * This returns the label text for the adapted class.
109         * <!-- begin-user-doc -->
110         * <!-- end-user-doc -->
111         * @generated
112         */
113        @Override
114        public String getText(Object object) {
115                String label = ((ExponentialDistribution)object).getUnitSpecification();
116                return label == null || label.length() == 0 ?
117                        getString("_UI_ExponentialDistribution_type") :
118                        getString("_UI_ExponentialDistribution_type") + " " + label;
119        }
120 
121        /**
122         * This handles model notifications by calling {@link #updateChildren} to update any cached
123         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
124         * <!-- begin-user-doc -->
125         * <!-- end-user-doc -->
126         * @generated
127         */
128        @Override
129        public void notifyChanged(Notification notification) {
130                updateChildren(notification);
131 
132                switch (notification.getFeatureID(ExponentialDistribution.class)) {
133                        case ProbfunctionPackage.EXPONENTIAL_DISTRIBUTION__RATE:
134                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
135                                return;
136                }
137                super.notifyChanged(notification);
138        }
139 
140        /**
141         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
142         * that can be created under this object.
143         * <!-- begin-user-doc -->
144         * <!-- end-user-doc -->
145         * @generated
146         */
147        @Override
148        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
149                super.collectNewChildDescriptors(newChildDescriptors, object);
150        }
151 
152}

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