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

nameclass, %method, %block, %line, %
ComplexItemProvider.java0%   (0/1)0%   (0/9)0%   (0/130)0%   (0/47)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComplexItemProvider0%   (0/1)0%   (0/9)0%   (0/130)0%   (0/47)
ComplexItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addImaginaryPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addRealPropertyDescriptor (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/17)0%   (0/2)
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.common.util.ResourceLocator;
15import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
16import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
17import org.eclipse.emf.edit.provider.IItemLabelProvider;
18import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
19import org.eclipse.emf.edit.provider.IItemPropertySource;
20import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
21import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
22import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.ItemProviderAdapter;
24import org.eclipse.emf.edit.provider.ViewerNotification;
25 
26import de.uka.ipd.sdq.probfunction.Complex;
27import de.uka.ipd.sdq.probfunction.ProbfunctionPackage;
28 
29/**
30 * This is the item provider adapter for a {@link de.uka.ipd.sdq.probfunction.Complex} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class ComplexItemProvider
36        extends ItemProviderAdapter
37        implements
38                IEditingDomainItemProvider,
39                IStructuredItemContentProvider,
40                ITreeItemContentProvider,
41                IItemLabelProvider,
42                IItemPropertySource {
43        /**
44         * <!-- begin-user-doc -->
45         * <!-- end-user-doc -->
46         * @generated
47         */
48        public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe";
49 
50        /**
51         * This constructs an instance from a factory and a notifier.
52         * <!-- begin-user-doc -->
53         * <!-- end-user-doc -->
54         * @generated
55         */
56        public ComplexItemProvider(AdapterFactory adapterFactory) {
57                super(adapterFactory);
58        }
59 
60        /**
61         * This returns the property descriptors for the adapted class.
62         * <!-- begin-user-doc -->
63         * <!-- end-user-doc -->
64         * @generated
65         */
66        @Override
67        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
68                if (itemPropertyDescriptors == null) {
69                        super.getPropertyDescriptors(object);
70 
71                        addRealPropertyDescriptor(object);
72                        addImaginaryPropertyDescriptor(object);
73                }
74                return itemPropertyDescriptors;
75        }
76 
77        /**
78         * This adds a property descriptor for the Real feature.
79         * <!-- begin-user-doc -->
80         * <!-- end-user-doc -->
81         * @generated
82         */
83        protected void addRealPropertyDescriptor(Object object) {
84                itemPropertyDescriptors.add
85                        (createItemPropertyDescriptor
86                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
87                                 getResourceLocator(),
88                                 getString("_UI_Complex_real_feature"),
89                                 getString("_UI_PropertyDescriptor_description", "_UI_Complex_real_feature", "_UI_Complex_type"),
90                                 ProbfunctionPackage.Literals.COMPLEX__REAL,
91                                 true,
92                                 false,
93                                 false,
94                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
95                                 null,
96                                 null));
97        }
98 
99        /**
100         * This adds a property descriptor for the Imaginary feature.
101         * <!-- begin-user-doc -->
102         * <!-- end-user-doc -->
103         * @generated
104         */
105        protected void addImaginaryPropertyDescriptor(Object object) {
106                itemPropertyDescriptors.add
107                        (createItemPropertyDescriptor
108                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
109                                 getResourceLocator(),
110                                 getString("_UI_Complex_imaginary_feature"),
111                                 getString("_UI_PropertyDescriptor_description", "_UI_Complex_imaginary_feature", "_UI_Complex_type"),
112                                 ProbfunctionPackage.Literals.COMPLEX__IMAGINARY,
113                                 true,
114                                 false,
115                                 false,
116                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
117                                 null,
118                                 null));
119        }
120 
121        /**
122         * This returns Complex.gif.
123         * <!-- begin-user-doc -->
124         * <!-- end-user-doc -->
125         * @generated
126         */
127        @Override
128        public Object getImage(Object object) {
129                return overlayImage(object, getResourceLocator().getImage("full/obj16/Complex"));
130        }
131 
132        /**
133         * This returns the label text for the adapted class.
134         * <!-- begin-user-doc -->
135         * <!-- end-user-doc -->
136         * @generated
137         */
138        @Override
139        public String getText(Object object) {
140                Complex complex = (Complex)object;
141                return getString("_UI_Complex_type") + " " + complex.getReal();
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(Complex.class)) {
156                        case ProbfunctionPackage.COMPLEX__REAL:
157                        case ProbfunctionPackage.COMPLEX__IMAGINARY:
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        /**
177         * Return the resource locator for this item provider's resources.
178         * <!-- begin-user-doc -->
179         * <!-- end-user-doc -->
180         * @generated
181         */
182        @Override
183        public ResourceLocator getResourceLocator() {
184                return ProbabilityFunctionEditPlugin.INSTANCE;
185        }
186 
187}

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