EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][EMOF.provider]

COVERAGE SUMMARY FOR SOURCE FILE [TagItemProvider.java]

nameclass, %method, %block, %line, %
TagItemProvider.java0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/63)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TagItemProvider0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/63)
TagItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addElementPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addNamePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addValuePropertyDescriptor (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/19)0%   (0/6)
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 EMOF.provider;
8 
9 
10import EMOF.EMOFPackage;
11import EMOF.Tag;
12 
13import java.util.Collection;
14import java.util.List;
15 
16import org.eclipse.emf.common.notify.AdapterFactory;
17import org.eclipse.emf.common.notify.Notification;
18 
19import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
20import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
21import org.eclipse.emf.edit.provider.IItemLabelProvider;
22import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.IItemPropertySource;
24import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
25import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
26import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
27import org.eclipse.emf.edit.provider.ViewerNotification;
28 
29/**
30 * This is the item provider adapter for a {@link EMOF.Tag} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class TagItemProvider
36        extends ElementItemProvider
37        implements
38                IEditingDomainItemProvider,
39                IStructuredItemContentProvider,
40                ITreeItemContentProvider,
41                IItemLabelProvider,
42                IItemPropertySource {
43        /**
44         * This constructs an instance from a factory and a notifier.
45         * <!-- begin-user-doc -->
46         * <!-- end-user-doc -->
47         * @generated
48         */
49        public TagItemProvider(AdapterFactory adapterFactory) {
50                super(adapterFactory);
51        }
52 
53        /**
54         * This returns the property descriptors for the adapted class.
55         * <!-- begin-user-doc -->
56         * <!-- end-user-doc -->
57         * @generated
58         */
59        @Override
60        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
61                if (itemPropertyDescriptors == null) {
62                        super.getPropertyDescriptors(object);
63 
64                        addElementPropertyDescriptor(object);
65                        addNamePropertyDescriptor(object);
66                        addValuePropertyDescriptor(object);
67                }
68                return itemPropertyDescriptors;
69        }
70 
71        /**
72         * This adds a property descriptor for the Element feature.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        protected void addElementPropertyDescriptor(Object object) {
78                itemPropertyDescriptors.add
79                        (createItemPropertyDescriptor
80                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81                                 getResourceLocator(),
82                                 getString("_UI_Tag_element_feature"),
83                                 getString("_UI_PropertyDescriptor_description", "_UI_Tag_element_feature", "_UI_Tag_type"),
84                                 EMOFPackage.Literals.TAG__ELEMENT,
85                                 true,
86                                 false,
87                                 true,
88                                 null,
89                                 null,
90                                 null));
91        }
92 
93        /**
94         * This adds a property descriptor for the Name feature.
95         * <!-- begin-user-doc -->
96         * <!-- end-user-doc -->
97         * @generated
98         */
99        protected void addNamePropertyDescriptor(Object object) {
100                itemPropertyDescriptors.add
101                        (createItemPropertyDescriptor
102                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
103                                 getResourceLocator(),
104                                 getString("_UI_Tag_name_feature"),
105                                 getString("_UI_PropertyDescriptor_description", "_UI_Tag_name_feature", "_UI_Tag_type"),
106                                 EMOFPackage.Literals.TAG__NAME,
107                                 true,
108                                 false,
109                                 false,
110                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
111                                 null,
112                                 null));
113        }
114 
115        /**
116         * This adds a property descriptor for the Value feature.
117         * <!-- begin-user-doc -->
118         * <!-- end-user-doc -->
119         * @generated
120         */
121        protected void addValuePropertyDescriptor(Object object) {
122                itemPropertyDescriptors.add
123                        (createItemPropertyDescriptor
124                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
125                                 getResourceLocator(),
126                                 getString("_UI_Tag_value_feature"),
127                                 getString("_UI_PropertyDescriptor_description", "_UI_Tag_value_feature", "_UI_Tag_type"),
128                                 EMOFPackage.Literals.TAG__VALUE,
129                                 true,
130                                 false,
131                                 false,
132                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
133                                 null,
134                                 null));
135        }
136 
137        /**
138         * This returns Tag.gif.
139         * <!-- begin-user-doc -->
140         * <!-- end-user-doc -->
141         * @generated
142         */
143        @Override
144        public Object getImage(Object object) {
145                return overlayImage(object, getResourceLocator().getImage("full/obj16/Tag"));
146        }
147 
148        /**
149         * This returns the label text for the adapted class.
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        public String getText(Object object) {
156                String label = ((Tag)object).getName();
157                return label == null || label.length() == 0 ?
158                        getString("_UI_Tag_type") :
159                        getString("_UI_Tag_type") + " " + label;
160        }
161 
162        /**
163         * This handles model notifications by calling {@link #updateChildren} to update any cached
164         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
165         * <!-- begin-user-doc -->
166         * <!-- end-user-doc -->
167         * @generated
168         */
169        @Override
170        public void notifyChanged(Notification notification) {
171                updateChildren(notification);
172 
173                switch (notification.getFeatureID(Tag.class)) {
174                        case EMOFPackage.TAG__NAME:
175                        case EMOFPackage.TAG__VALUE:
176                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
177                                return;
178                }
179                super.notifyChanged(notification);
180        }
181 
182        /**
183         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
184         * that can be created under this object.
185         * <!-- begin-user-doc -->
186         * <!-- end-user-doc -->
187         * @generated
188         */
189        @Override
190        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
191                super.collectNewChildDescriptors(newChildDescriptors, object);
192        }
193 
194}

[all classes][EMOF.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov