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

COVERAGE SUMMARY FOR SOURCE FILE [RequirementItemProvider.java]

nameclass, %method, %block, %line, %
RequirementItemProvider.java0%   (0/1)0%   (0/7)0%   (0/85)0%   (0/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RequirementItemProvider0%   (0/1)0%   (0/7)0%   (0/85)0%   (0/30)
RequirementItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addRequireContractPropertyDescriptor (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/13)0%   (0/4)
getResourceLocator (): ResourceLocator 0%   (0/1)0%   (0/2)0%   (0/1)
getText (Object): String 0%   (0/1)0%   (0/26)0%   (0/4)
notifyChanged (Notification): void 0%   (0/1)0%   (0/7)0%   (0/3)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider;
8 
9 
10import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.QMLProfilePackage;
11import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.Requirement;
12 
13import de.uka.ipd.sdq.identifier.provider.IdentifierItemProvider;
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.common.util.ResourceLocator;
22 
23import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
24import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
25import org.eclipse.emf.edit.provider.IItemLabelProvider;
26import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
27import org.eclipse.emf.edit.provider.IItemPropertySource;
28import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
29import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
30 
31/**
32 * This is the item provider adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.Requirement} object.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37public class RequirementItemProvider
38        extends IdentifierItemProvider
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 RequirementItemProvider(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                        addRequireContractPropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Require Contract feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addRequireContractPropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_Requirement_requireContract_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_Requirement_requireContract_feature", "_UI_Requirement_type"),
84                                 QMLProfilePackage.Literals.REQUIREMENT__REQUIRE_CONTRACT,
85                                 true,
86                                 false,
87                                 true,
88                                 null,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This returns the label text for the adapted class.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        @Override
100        public String getText(Object object) {
101                String label = ((Requirement)object).getId();
102                return label == null || label.length() == 0 ?
103                        getString("_UI_Requirement_type") :
104                        getString("_UI_Requirement_type") + " " + label;
105        }
106 
107        /**
108         * This handles model notifications by calling {@link #updateChildren} to update any cached
109         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
110         * <!-- begin-user-doc -->
111         * <!-- end-user-doc -->
112         * @generated
113         */
114        @Override
115        public void notifyChanged(Notification notification) {
116                updateChildren(notification);
117                super.notifyChanged(notification);
118        }
119 
120        /**
121         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
122         * that can be created under this object.
123         * <!-- begin-user-doc -->
124         * <!-- end-user-doc -->
125         * @generated
126         */
127        @Override
128        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
129                super.collectNewChildDescriptors(newChildDescriptors, object);
130        }
131 
132        /**
133         * Return the resource locator for this item provider's resources.
134         * <!-- begin-user-doc -->
135         * <!-- end-user-doc -->
136         * @generated
137         */
138        @Override
139        public ResourceLocator getResourceLocator() {
140                return QMLProfileEditPlugin.INSTANCE;
141        }
142 
143}

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