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

COVERAGE SUMMARY FOR SOURCE FILE [DimensionTypeItemProvider.java]

nameclass, %method, %block, %line, %
DimensionTypeItemProvider.java0%   (0/1)0%   (0/8)0%   (0/97)0%   (0/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DimensionTypeItemProvider0%   (0/1)0%   (0/8)0%   (0/97)0%   (0/27)
DimensionTypeItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/13)0%   (0/6)
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.contracttype.QMLContractType.provider;
8 
9 
10import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.DimensionType;
11import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypeFactory;
12import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractTypePackage;
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.contracttype.QMLContractType.DimensionType} object.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @generated
41 */
42public class DimensionTypeItemProvider
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 DimensionTypeItemProvider(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(QMLContractTypePackage.Literals.DIMENSION_TYPE__RELATION_SEMANTICS);
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 = ((DimensionType)object).getId();
114                return label == null || label.length() == 0 ?
115                        getString("_UI_DimensionType_type") :
116                        getString("_UI_DimensionType_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(DimensionType.class)) {
131                        case QMLContractTypePackage.DIMENSION_TYPE__RELATION_SEMANTICS:
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                                (QMLContractTypePackage.Literals.DIMENSION_TYPE__RELATION_SEMANTICS,
152                                 QMLContractTypeFactory.eINSTANCE.createRelationSemantics()));
153        }
154 
155        /**
156         * Return the resource locator for this item provider's resources.
157         * <!-- begin-user-doc -->
158         * <!-- end-user-doc -->
159         * @generated
160         */
161        @Override
162        public ResourceLocator getResourceLocator() {
163                return QMLProfileEditPlugin.INSTANCE;
164        }
165 
166}

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