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

nameclass, %method, %block, %line, %
RelationSemanticsItemProvider.java0%   (0/1)0%   (0/8)0%   (0/108)0%   (0/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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