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

COVERAGE SUMMARY FOR SOURCE FILE [AggregatedCommunicationItemProvider.java]

nameclass, %method, %block, %line, %
AggregatedCommunicationItemProvider.java0%   (0/1)0%   (0/11)0%   (0/192)0%   (0/77)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AggregatedCommunicationItemProvider0%   (0/1)0%   (0/11)0%   (0/192)0%   (0/77)
AggregatedCommunicationItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addAverageMessageFrequencyPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addAverageMessageSizePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addReceiver_AggregatedCommunicationPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addUsedCommunicationLinkResourceSpecification_AggregatedCommunicationProperty... 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/22)0%   (0/7)
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 2006, SDQ Group, University Karlsruhe (TH)
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.context.aggregatedUsageContext.provider;
7 
8 
9import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication;
10import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextPackage;
11 
12import de.uka.ipd.sdq.context.computed_usage.provider.ContextEditPlugin;
13 
14import java.util.Collection;
15import java.util.List;
16 
17import org.eclipse.emf.common.notify.AdapterFactory;
18import org.eclipse.emf.common.notify.Notification;
19 
20import org.eclipse.emf.common.util.ResourceLocator;
21 
22import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
23import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
24import org.eclipse.emf.edit.provider.IItemLabelProvider;
25import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
26import org.eclipse.emf.edit.provider.IItemPropertySource;
27import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
28import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
29import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
30import org.eclipse.emf.edit.provider.ItemProviderAdapter;
31import org.eclipse.emf.edit.provider.ViewerNotification;
32 
33/**
34 * This is the item provider adapter for a {@link de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication} object.
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @generated
38 */
39public class AggregatedCommunicationItemProvider
40        extends ItemProviderAdapter
41        implements
42                IEditingDomainItemProvider,
43                IStructuredItemContentProvider,
44                ITreeItemContentProvider,
45                IItemLabelProvider,
46                IItemPropertySource {
47        /**
48         * <!-- begin-user-doc -->
49         * <!-- end-user-doc -->
50         * @generated
51         */
52        public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)";
53 
54        /**
55         * This constructs an instance from a factory and a notifier.
56         * <!-- begin-user-doc -->
57         * <!-- end-user-doc -->
58         * @generated
59         */
60        public AggregatedCommunicationItemProvider(AdapterFactory adapterFactory) {
61                super(adapterFactory);
62        }
63 
64        /**
65         * This returns the property descriptors for the adapted class.
66         * <!-- begin-user-doc -->
67         * <!-- end-user-doc -->
68         * @generated
69         */
70        @Override
71        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
72                if (itemPropertyDescriptors == null) {
73                        super.getPropertyDescriptors(object);
74 
75                        addAverageMessageSizePropertyDescriptor(object);
76                        addAverageMessageFrequencyPropertyDescriptor(object);
77                        addReceiver_AggregatedCommunicationPropertyDescriptor(object);
78                        addUsedCommunicationLinkResourceSpecification_AggregatedCommunicationPropertyDescriptor(object);
79                }
80                return itemPropertyDescriptors;
81        }
82 
83        /**
84         * This adds a property descriptor for the Average Message Size feature.
85         * <!-- begin-user-doc -->
86         * <!-- end-user-doc -->
87         * @generated
88         */
89        protected void addAverageMessageSizePropertyDescriptor(Object object) {
90                itemPropertyDescriptors.add
91                        (createItemPropertyDescriptor
92                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
93                                 getResourceLocator(),
94                                 getString("_UI_AggregatedCommunication_averageMessageSize_feature"),
95                                 getString("_UI_PropertyDescriptor_description", "_UI_AggregatedCommunication_averageMessageSize_feature", "_UI_AggregatedCommunication_type"),
96                                 AggregatedUsageContextPackage.Literals.AGGREGATED_COMMUNICATION__AVERAGE_MESSAGE_SIZE,
97                                 true,
98                                 false,
99                                 false,
100                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
101                                 null,
102                                 null));
103        }
104 
105        /**
106         * This adds a property descriptor for the Average Message Frequency feature.
107         * <!-- begin-user-doc -->
108         * <!-- end-user-doc -->
109         * @generated
110         */
111        protected void addAverageMessageFrequencyPropertyDescriptor(Object object) {
112                itemPropertyDescriptors.add
113                        (createItemPropertyDescriptor
114                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
115                                 getResourceLocator(),
116                                 getString("_UI_AggregatedCommunication_averageMessageFrequency_feature"),
117                                 getString("_UI_PropertyDescriptor_description", "_UI_AggregatedCommunication_averageMessageFrequency_feature", "_UI_AggregatedCommunication_type"),
118                                 AggregatedUsageContextPackage.Literals.AGGREGATED_COMMUNICATION__AVERAGE_MESSAGE_FREQUENCY,
119                                 true,
120                                 false,
121                                 false,
122                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
123                                 null,
124                                 null));
125        }
126 
127        /**
128         * This adds a property descriptor for the Receiver Aggregated Communication feature.
129         * <!-- begin-user-doc -->
130         * <!-- end-user-doc -->
131         * @generated
132         */
133        protected void addReceiver_AggregatedCommunicationPropertyDescriptor(Object object) {
134                itemPropertyDescriptors.add
135                        (createItemPropertyDescriptor
136                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
137                                 getResourceLocator(),
138                                 getString("_UI_AggregatedCommunication_receiver_AggregatedCommunication_feature"),
139                                 getString("_UI_PropertyDescriptor_description", "_UI_AggregatedCommunication_receiver_AggregatedCommunication_feature", "_UI_AggregatedCommunication_type"),
140                                 AggregatedUsageContextPackage.Literals.AGGREGATED_COMMUNICATION__RECEIVER_AGGREGATED_COMMUNICATION,
141                                 true,
142                                 false,
143                                 true,
144                                 null,
145                                 null,
146                                 null));
147        }
148 
149        /**
150         * This adds a property descriptor for the Used Communication Link Resource Specification Aggregated Communication feature.
151         * <!-- begin-user-doc -->
152         * <!-- end-user-doc -->
153         * @generated
154         */
155        protected void addUsedCommunicationLinkResourceSpecification_AggregatedCommunicationPropertyDescriptor(Object object) {
156                itemPropertyDescriptors.add
157                        (createItemPropertyDescriptor
158                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
159                                 getResourceLocator(),
160                                 getString("_UI_AggregatedCommunication_usedCommunicationLinkResourceSpecification_AggregatedCommunication_feature"),
161                                 getString("_UI_PropertyDescriptor_description", "_UI_AggregatedCommunication_usedCommunicationLinkResourceSpecification_AggregatedCommunication_feature", "_UI_AggregatedCommunication_type"),
162                                 AggregatedUsageContextPackage.Literals.AGGREGATED_COMMUNICATION__USED_COMMUNICATION_LINK_RESOURCE_SPECIFICATION_AGGREGATED_COMMUNICATION,
163                                 true,
164                                 false,
165                                 true,
166                                 null,
167                                 null,
168                                 null));
169        }
170 
171        /**
172         * This returns AggregatedCommunication.gif.
173         * <!-- begin-user-doc -->
174         * <!-- end-user-doc -->
175         * @generated
176         */
177        @Override
178        public Object getImage(Object object) {
179                return overlayImage(object, getResourceLocator().getImage("full/obj16/AggregatedCommunication"));
180        }
181 
182        /**
183         * This returns the label text for the adapted class.
184         * <!-- begin-user-doc -->
185         * <!-- end-user-doc -->
186         * @generated
187         */
188        @Override
189        public String getText(Object object) {
190                AggregatedCommunication aggregatedCommunication = (AggregatedCommunication)object;
191                return getString("_UI_AggregatedCommunication_type") + " " + aggregatedCommunication.getAverageMessageSize();
192        }
193 
194        /**
195         * This handles model notifications by calling {@link #updateChildren} to update any cached
196         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
197         * <!-- begin-user-doc -->
198         * <!-- end-user-doc -->
199         * @generated
200         */
201        @Override
202        public void notifyChanged(Notification notification) {
203                updateChildren(notification);
204 
205                switch (notification.getFeatureID(AggregatedCommunication.class)) {
206                        case AggregatedUsageContextPackage.AGGREGATED_COMMUNICATION__AVERAGE_MESSAGE_SIZE:
207                        case AggregatedUsageContextPackage.AGGREGATED_COMMUNICATION__AVERAGE_MESSAGE_FREQUENCY:
208                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
209                                return;
210                }
211                super.notifyChanged(notification);
212        }
213 
214        /**
215         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
216         * that can be created under this object.
217         * <!-- begin-user-doc -->
218         * <!-- end-user-doc -->
219         * @generated
220         */
221        @Override
222        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
223                super.collectNewChildDescriptors(newChildDescriptors, object);
224        }
225 
226        /**
227         * Return the resource locator for this item provider's resources.
228         * <!-- begin-user-doc -->
229         * <!-- end-user-doc -->
230         * @generated
231         */
232        @Override
233        public ResourceLocator getResourceLocator() {
234                return ContextEditPlugin.INSTANCE;
235        }
236 
237}

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