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

COVERAGE SUMMARY FOR SOURCE FILE [ActiveResourceUtilisationResultItemProvider.java]

nameclass, %method, %block, %line, %
ActiveResourceUtilisationResultItemProvider.java0%   (0/1)0%   (0/7)0%   (0/129)0%   (0/47)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ActiveResourceUtilisationResultItemProvider0%   (0/1)0%   (0/7)0%   (0/129)0%   (0/47)
ActiveResourceUtilisationResultItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addDemandedTimePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addNormalisedDemandedTimePropertyDescriptor (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/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.pcm.resultdecorator.resourceenvironmentdecorator.provider;
8 
9 
10import de.uka.ipd.sdq.pcm.resultdecorator.resourceenvironmentdecorator.ActiveResourceUtilisationResult;
11import de.uka.ipd.sdq.pcm.resultdecorator.resourceenvironmentdecorator.ResourceenvironmentdecoratorPackage;
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.pcm.resultdecorator.resourceenvironmentdecorator.ActiveResourceUtilisationResult} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class ActiveResourceUtilisationResultItemProvider
36        extends UtilisationResultItemProvider
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 ActiveResourceUtilisationResultItemProvider(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                        addNormalisedDemandedTimePropertyDescriptor(object);
65                        addDemandedTimePropertyDescriptor(object);
66                }
67                return itemPropertyDescriptors;
68        }
69 
70        /**
71         * This adds a property descriptor for the Normalised Demanded Time feature.
72         * <!-- begin-user-doc -->
73         * <!-- end-user-doc -->
74         * @generated
75         */
76        protected void addNormalisedDemandedTimePropertyDescriptor(Object object) {
77                itemPropertyDescriptors.add
78                        (createItemPropertyDescriptor
79                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
80                                 getResourceLocator(),
81                                 getString("_UI_ActiveResourceUtilisationResult_normalisedDemandedTime_feature"),
82                                 getString("_UI_PropertyDescriptor_description", "_UI_ActiveResourceUtilisationResult_normalisedDemandedTime_feature", "_UI_ActiveResourceUtilisationResult_type"),
83                                 ResourceenvironmentdecoratorPackage.Literals.ACTIVE_RESOURCE_UTILISATION_RESULT__NORMALISED_DEMANDED_TIME,
84                                 true,
85                                 false,
86                                 false,
87                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
88                                 null,
89                                 null));
90        }
91 
92        /**
93         * This adds a property descriptor for the Demanded Time feature.
94         * <!-- begin-user-doc -->
95         * <!-- end-user-doc -->
96         * @generated
97         */
98        protected void addDemandedTimePropertyDescriptor(Object object) {
99                itemPropertyDescriptors.add
100                        (createItemPropertyDescriptor
101                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102                                 getResourceLocator(),
103                                 getString("_UI_ActiveResourceUtilisationResult_demandedTime_feature"),
104                                 getString("_UI_PropertyDescriptor_description", "_UI_ActiveResourceUtilisationResult_demandedTime_feature", "_UI_ActiveResourceUtilisationResult_type"),
105                                 ResourceenvironmentdecoratorPackage.Literals.ACTIVE_RESOURCE_UTILISATION_RESULT__DEMANDED_TIME,
106                                 true,
107                                 false,
108                                 false,
109                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
110                                 null,
111                                 null));
112        }
113 
114        /**
115         * This returns the label text for the adapted class.
116         * <!-- begin-user-doc -->
117         * <!-- end-user-doc -->
118         * @generated
119         */
120        @Override
121        public String getText(Object object) {
122                String label = ((ActiveResourceUtilisationResult)object).getEntityName();
123                return label == null || label.length() == 0 ?
124                        getString("_UI_ActiveResourceUtilisationResult_type") :
125                        getString("_UI_ActiveResourceUtilisationResult_type") + " " + label;
126        }
127 
128        /**
129         * This handles model notifications by calling {@link #updateChildren} to update any cached
130         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
131         * <!-- begin-user-doc -->
132         * <!-- end-user-doc -->
133         * @generated
134         */
135        @Override
136        public void notifyChanged(Notification notification) {
137                updateChildren(notification);
138 
139                switch (notification.getFeatureID(ActiveResourceUtilisationResult.class)) {
140                        case ResourceenvironmentdecoratorPackage.ACTIVE_RESOURCE_UTILISATION_RESULT__NORMALISED_DEMANDED_TIME:
141                        case ResourceenvironmentdecoratorPackage.ACTIVE_RESOURCE_UTILISATION_RESULT__DEMANDED_TIME:
142                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
143                                return;
144                }
145                super.notifyChanged(notification);
146        }
147 
148        /**
149         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
150         * that can be created under this object.
151         * <!-- begin-user-doc -->
152         * <!-- end-user-doc -->
153         * @generated
154         */
155        @Override
156        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
157                super.collectNewChildDescriptors(newChildDescriptors, object);
158        }
159 
160}

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