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

COVERAGE SUMMARY FOR SOURCE FILE [AspectRequirementItemProvider.java]

nameclass, %method, %block, %line, %
AspectRequirementItemProvider.java0%   (0/1)0%   (0/8)0%   (0/113)0%   (0/35)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AspectRequirementItemProvider0%   (0/1)0%   (0/8)0%   (0/113)0%   (0/35)
AspectRequirementItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/29)0%   (0/14)
getChildFeature (Object, Object): EStructuralFeature 0%   (0/1)0%   (0/5)0%   (0/1)
getChildrenFeatures (Object): Collection 0%   (0/1)0%   (0/15)0%   (0/4)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/10)0%   (0/3)
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/22)0%   (0/6)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.provider;
8 
9 
10import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.AspectRequirement;
11import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.QMLContractFactory;
12import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.QMLContractPackage;
13 
14import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider.QMLProfileEditPlugin;
15 
16import de.uka.ipd.sdq.identifier.provider.IdentifierItemProvider;
17 
18import java.util.Collection;
19import java.util.List;
20 
21import org.eclipse.emf.common.notify.AdapterFactory;
22import org.eclipse.emf.common.notify.Notification;
23 
24import org.eclipse.emf.common.util.ResourceLocator;
25 
26import org.eclipse.emf.ecore.EStructuralFeature;
27 
28import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
29import org.eclipse.emf.edit.provider.IItemLabelProvider;
30import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
31import org.eclipse.emf.edit.provider.IItemPropertySource;
32import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
33import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
34import org.eclipse.emf.edit.provider.ViewerNotification;
35 
36/**
37 * This is the item provider adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.AspectRequirement} object.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @generated
41 */
42public class AspectRequirementItemProvider
43        extends IdentifierItemProvider
44        implements
45                IEditingDomainItemProvider,
46                IStructuredItemContentProvider,
47                ITreeItemContentProvider,
48                IItemLabelProvider,
49                IItemPropertySource {
50        /**
51         * This constructs an instance from a factory and a notifier.
52         * <!-- begin-user-doc -->
53         * <!-- end-user-doc -->
54         * @generated
55         */
56        public AspectRequirementItemProvider(AdapterFactory adapterFactory) {
57                super(adapterFactory);
58        }
59 
60        /**
61         * This returns the property descriptors for the adapted class.
62         * <!-- begin-user-doc -->
63         * <!-- end-user-doc -->
64         * @generated
65         */
66        @Override
67        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
68                if (itemPropertyDescriptors == null) {
69                        super.getPropertyDescriptors(object);
70 
71                }
72                return itemPropertyDescriptors;
73        }
74 
75        /**
76         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
77         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
78         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
79         * <!-- begin-user-doc -->
80         * <!-- end-user-doc -->
81         * @generated
82         */
83        @Override
84        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
85                if (childrenFeatures == null) {
86                        super.getChildrenFeatures(object);
87                        childrenFeatures.add(QMLContractPackage.Literals.ASPECT_REQUIREMENT__ASPECT_REQUIREMENT_LITERAL);
88                }
89                return childrenFeatures;
90        }
91 
92        /**
93         * <!-- begin-user-doc -->
94         * <!-- end-user-doc -->
95         * @generated
96         */
97        @Override
98        protected EStructuralFeature getChildFeature(Object object, Object child) {
99                // Check the type of the specified child object and return the proper feature to use for
100                // adding (see {@link AddCommand}) it as a child.
101 
102                return super.getChildFeature(object, child);
103        }
104 
105        /**
106         * This returns the label text for the adapted class.
107         * <!-- begin-user-doc -->
108         * <!-- end-user-doc -->
109         * @generated
110         */
111        @Override
112        public String getText(Object object) {
113                String label = ((AspectRequirement)object).getId();
114                return label == null || label.length() == 0 ?
115                        getString("_UI_AspectRequirement_type") :
116                        getString("_UI_AspectRequirement_type") + " " + label;
117        }
118 
119        /**
120         * This handles model notifications by calling {@link #updateChildren} to update any cached
121         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
122         * <!-- begin-user-doc -->
123         * <!-- end-user-doc -->
124         * @generated
125         */
126        @Override
127        public void notifyChanged(Notification notification) {
128                updateChildren(notification);
129 
130                switch (notification.getFeatureID(AspectRequirement.class)) {
131                        case QMLContractPackage.ASPECT_REQUIREMENT__ASPECT_REQUIREMENT_LITERAL:
132                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
133                                return;
134                }
135                super.notifyChanged(notification);
136        }
137 
138        /**
139         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
140         * that can be created under this object.
141         * <!-- begin-user-doc -->
142         * <!-- end-user-doc -->
143         * @generated
144         */
145        @Override
146        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
147                super.collectNewChildDescriptors(newChildDescriptors, object);
148 
149                newChildDescriptors.add
150                        (createChildParameter
151                                (QMLContractPackage.Literals.ASPECT_REQUIREMENT__ASPECT_REQUIREMENT_LITERAL,
152                                 QMLContractFactory.eINSTANCE.createNumericLiteral()));
153 
154                newChildDescriptors.add
155                        (createChildParameter
156                                (QMLContractPackage.Literals.ASPECT_REQUIREMENT__ASPECT_REQUIREMENT_LITERAL,
157                                 QMLContractFactory.eINSTANCE.createEnumLiteral()));
158 
159                newChildDescriptors.add
160                        (createChildParameter
161                                (QMLContractPackage.Literals.ASPECT_REQUIREMENT__ASPECT_REQUIREMENT_LITERAL,
162                                 QMLContractFactory.eINSTANCE.createSetLiteral()));
163        }
164 
165        /**
166         * Return the resource locator for this item provider's resources.
167         * <!-- begin-user-doc -->
168         * <!-- end-user-doc -->
169         * @generated
170         */
171        @Override
172        public ResourceLocator getResourceLocator() {
173                return QMLProfileEditPlugin.INSTANCE;
174        }
175 
176}

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