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

COVERAGE SUMMARY FOR SOURCE FILE [SchedulingPolicyChoiceItemProvider.java]

nameclass, %method, %block, %line, %
SchedulingPolicyChoiceItemProvider.java0%   (0/1)0%   (0/7)0%   (0/97)0%   (0/31)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SchedulingPolicyChoiceItemProvider0%   (0/1)0%   (0/7)0%   (0/97)0%   (0/31)
SchedulingPolicyChoiceItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addChosenValuePropertyDescriptor (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/13)0%   (0/4)
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.designdecision.provider;
8 
9 
10import de.uka.ipd.sdq.pcm.designdecision.SchedulingPolicyChoice;
11import de.uka.ipd.sdq.pcm.designdecision.designdecisionPackage;
12 
13import de.uka.ipd.sdq.pcm.resourceenvironment.SchedulingPolicy;
14 
15import java.util.Collection;
16import java.util.List;
17 
18import org.eclipse.emf.common.notify.AdapterFactory;
19import org.eclipse.emf.common.notify.Notification;
20 
21import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
22import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
23import org.eclipse.emf.edit.provider.IItemLabelProvider;
24import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
25import org.eclipse.emf.edit.provider.IItemPropertySource;
26import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
27import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
28import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
29import org.eclipse.emf.edit.provider.ViewerNotification;
30 
31/**
32 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.designdecision.SchedulingPolicyChoice} object.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37public class SchedulingPolicyChoiceItemProvider
38        extends ChoiceItemProvider
39        implements
40                IEditingDomainItemProvider,
41                IStructuredItemContentProvider,
42                ITreeItemContentProvider,
43                IItemLabelProvider,
44                IItemPropertySource {
45        /**
46         * This constructs an instance from a factory and a notifier.
47         * <!-- begin-user-doc -->
48         * <!-- end-user-doc -->
49         * @generated
50         */
51        public SchedulingPolicyChoiceItemProvider(AdapterFactory adapterFactory) {
52                super(adapterFactory);
53        }
54 
55        /**
56         * This returns the property descriptors for the adapted class.
57         * <!-- begin-user-doc -->
58         * <!-- end-user-doc -->
59         * @generated
60         */
61        @Override
62        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
63                if (itemPropertyDescriptors == null) {
64                        super.getPropertyDescriptors(object);
65 
66                        addChosenValuePropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Chosen Value feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addChosenValuePropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_SchedulingPolicyChoice_chosenValue_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_SchedulingPolicyChoice_chosenValue_feature", "_UI_SchedulingPolicyChoice_type"),
84                                 designdecisionPackage.Literals.SCHEDULING_POLICY_CHOICE__CHOSEN_VALUE,
85                                 true,
86                                 false,
87                                 false,
88                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This returns SchedulingPolicyChoice.gif.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        @Override
100        public Object getImage(Object object) {
101                return overlayImage(object, getResourceLocator().getImage("full/obj16/SchedulingPolicyChoice"));
102        }
103 
104        /**
105         * This returns the label text for the adapted class.
106         * <!-- begin-user-doc -->
107         * <!-- end-user-doc -->
108         * @generated
109         */
110        @Override
111        public String getText(Object object) {
112                SchedulingPolicyChoice schedulingPolicyChoice = (SchedulingPolicyChoice)object;
113                return getString("_UI_SchedulingPolicyChoice_type") + " " + schedulingPolicyChoice.isActive();
114        }
115 
116        /**
117         * This handles model notifications by calling {@link #updateChildren} to update any cached
118         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
119         * <!-- begin-user-doc -->
120         * <!-- end-user-doc -->
121         * @generated
122         */
123        @Override
124        public void notifyChanged(Notification notification) {
125                updateChildren(notification);
126 
127                switch (notification.getFeatureID(SchedulingPolicyChoice.class)) {
128                        case designdecisionPackage.SCHEDULING_POLICY_CHOICE__CHOSEN_VALUE:
129                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
130                                return;
131                }
132                super.notifyChanged(notification);
133        }
134 
135        /**
136         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
137         * that can be created under this object.
138         * <!-- begin-user-doc -->
139         * <!-- end-user-doc -->
140         * @generated
141         */
142        @Override
143        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
144                super.collectNewChildDescriptors(newChildDescriptors, object);
145        }
146 
147}

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