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 [UnitRepositoryItemProvider.java]

nameclass, %method, %block, %line, %
UnitRepositoryItemProvider.java0%   (0/1)0%   (0/8)0%   (0/93)0%   (0/31)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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