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

COVERAGE SUMMARY FOR SOURCE FILE [VariableCostItemProvider.java]

nameclass, %method, %block, %line, %
VariableCostItemProvider.java0%   (0/1)0%   (0/7)0%   (0/120)0%   (0/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VariableCostItemProvider0%   (0/1)0%   (0/7)0%   (0/120)0%   (0/45)
VariableCostItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addFixedInitialCostPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addFixedOperatingCostPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/5)0%   (0/2)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/16)0%   (0/5)
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>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.pcm.cost.provider;
8 
9 
10import de.uka.ipd.sdq.pcm.cost.VariableCost;
11import de.uka.ipd.sdq.pcm.cost.costPackage;
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.common.util.ResourceLocator;
20import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
21import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
22import org.eclipse.emf.edit.provider.IItemLabelProvider;
23import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
24import org.eclipse.emf.edit.provider.IItemPropertySource;
25import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
26import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
27import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
28import org.eclipse.emf.edit.provider.ViewerNotification;
29 
30/**
31 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.cost.VariableCost} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class VariableCostItemProvider
37        extends CostItemProvider
38        implements
39                IEditingDomainItemProvider,
40                IStructuredItemContentProvider,
41                ITreeItemContentProvider,
42                IItemLabelProvider,
43                IItemPropertySource {
44        /**
45         * This constructs an instance from a factory and a notifier.
46         * <!-- begin-user-doc -->
47         * <!-- end-user-doc -->
48         * @generated
49         */
50        public VariableCostItemProvider(AdapterFactory adapterFactory) {
51                super(adapterFactory);
52        }
53 
54        /**
55         * This returns the property descriptors for the adapted class.
56         * <!-- begin-user-doc -->
57         * <!-- end-user-doc -->
58         * @generated
59         */
60        @Override
61        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
62                if (itemPropertyDescriptors == null) {
63                        super.getPropertyDescriptors(object);
64 
65                        addFixedInitialCostPropertyDescriptor(object);
66                        addFixedOperatingCostPropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Fixed Initial Cost feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addFixedInitialCostPropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_VariableCost_fixedInitialCost_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableCost_fixedInitialCost_feature", "_UI_VariableCost_type"),
84                                 costPackage.Literals.VARIABLE_COST__FIXED_INITIAL_COST,
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 Fixed Operating Cost feature.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        protected void addFixedOperatingCostPropertyDescriptor(Object object) {
100                itemPropertyDescriptors.add
101                        (createItemPropertyDescriptor
102                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
103                                 getResourceLocator(),
104                                 getString("_UI_VariableCost_fixedOperatingCost_feature"),
105                                 getString("_UI_PropertyDescriptor_description", "_UI_VariableCost_fixedOperatingCost_feature", "_UI_VariableCost_type"),
106                                 costPackage.Literals.VARIABLE_COST__FIXED_OPERATING_COST,
107                                 true,
108                                 false,
109                                 false,
110                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
111                                 null,
112                                 null));
113        }
114 
115        /**
116         * This returns the label text for the adapted class.
117         * <!-- begin-user-doc -->
118         * <!-- end-user-doc -->
119         * @generated
120         */
121        @Override
122        public String getText(Object object) {
123                VariableCost variableCost = (VariableCost)object;
124                return getString("_UI_VariableCost_type") + " " + variableCost.getInitialCost();
125        }
126 
127        /**
128         * This handles model notifications by calling {@link #updateChildren} to update any cached
129         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
130         * <!-- begin-user-doc -->
131         * <!-- end-user-doc -->
132         * @generated
133         */
134        @Override
135        public void notifyChanged(Notification notification) {
136                updateChildren(notification);
137 
138                switch (notification.getFeatureID(VariableCost.class)) {
139                        case costPackage.VARIABLE_COST__FIXED_INITIAL_COST:
140                        case costPackage.VARIABLE_COST__FIXED_OPERATING_COST:
141                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
142                                return;
143                }
144                super.notifyChanged(notification);
145        }
146 
147        /**
148         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
149         * that can be created under this object.
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
156                super.collectNewChildDescriptors(newChildDescriptors, object);
157        }
158 
159}

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