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

nameclass, %method, %block, %line, %
NormalDistributionItemProvider.java0%   (0/1)0%   (0/8)0%   (0/137)0%   (0/48)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NormalDistributionItemProvider0%   (0/1)0%   (0/8)0%   (0/137)0%   (0/48)
NormalDistributionItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addMuPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addSigmaPropertyDescriptor (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)
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.NormalDistribution;
25import de.uka.ipd.sdq.probfunction.ProbfunctionPackage;
26 
27/**
28 * This is the item provider adapter for a {@link de.uka.ipd.sdq.probfunction.NormalDistribution} object.
29 * <!-- begin-user-doc -->
30 * <!-- end-user-doc -->
31 * @generated
32 */
33public class NormalDistributionItemProvider
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 NormalDistributionItemProvider(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                        addMuPropertyDescriptor(object);
70                        addSigmaPropertyDescriptor(object);
71                }
72                return itemPropertyDescriptors;
73        }
74 
75        /**
76         * This adds a property descriptor for the Mu feature.
77         * <!-- begin-user-doc -->
78         * <!-- end-user-doc -->
79         * @generated
80         */
81        protected void addMuPropertyDescriptor(Object object) {
82                itemPropertyDescriptors.add
83                        (createItemPropertyDescriptor
84                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
85                                 getResourceLocator(),
86                                 getString("_UI_NormalDistribution_mu_feature"),
87                                 getString("_UI_PropertyDescriptor_description", "_UI_NormalDistribution_mu_feature", "_UI_NormalDistribution_type"),
88                                 ProbfunctionPackage.Literals.NORMAL_DISTRIBUTION__MU,
89                                 true,
90                                 false,
91                                 false,
92                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
93                                 null,
94                                 null));
95        }
96 
97        /**
98         * This adds a property descriptor for the Sigma feature.
99         * <!-- begin-user-doc -->
100         * <!-- end-user-doc -->
101         * @generated
102         */
103        protected void addSigmaPropertyDescriptor(Object object) {
104                itemPropertyDescriptors.add
105                        (createItemPropertyDescriptor
106                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
107                                 getResourceLocator(),
108                                 getString("_UI_NormalDistribution_sigma_feature"),
109                                 getString("_UI_PropertyDescriptor_description", "_UI_NormalDistribution_sigma_feature", "_UI_NormalDistribution_type"),
110                                 ProbfunctionPackage.Literals.NORMAL_DISTRIBUTION__SIGMA,
111                                 true,
112                                 false,
113                                 false,
114                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
115                                 null,
116                                 null));
117        }
118 
119        /**
120         * This returns NormalDistribution.gif.
121         * <!-- begin-user-doc -->
122         * <!-- end-user-doc -->
123         * @generated
124         */
125        @Override
126        public Object getImage(Object object) {
127                return overlayImage(object, getResourceLocator().getImage("full/obj16/NormalDistribution"));
128        }
129 
130        /**
131         * This returns the label text for the adapted class.
132         * <!-- begin-user-doc -->
133         * <!-- end-user-doc -->
134         * @generated
135         */
136        @Override
137        public String getText(Object object) {
138                String label = ((NormalDistribution)object).getUnitSpecification();
139                return label == null || label.length() == 0 ?
140                        getString("_UI_NormalDistribution_type") :
141                        getString("_UI_NormalDistribution_type") + " " + label;
142        }
143 
144        /**
145         * This handles model notifications by calling {@link #updateChildren} to update any cached
146         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
147         * <!-- begin-user-doc -->
148         * <!-- end-user-doc -->
149         * @generated
150         */
151        @Override
152        public void notifyChanged(Notification notification) {
153                updateChildren(notification);
154 
155                switch (notification.getFeatureID(NormalDistribution.class)) {
156                        case ProbfunctionPackage.NORMAL_DISTRIBUTION__MU:
157                        case ProbfunctionPackage.NORMAL_DISTRIBUTION__SIGMA:
158                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
159                                return;
160                }
161                super.notifyChanged(notification);
162        }
163 
164        /**
165         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
166         * that can be created under this object.
167         * <!-- begin-user-doc -->
168         * <!-- end-user-doc -->
169         * @generated
170         */
171        @Override
172        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
173                super.collectNewChildDescriptors(newChildDescriptors, object);
174        }
175 
176}

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