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

COVERAGE SUMMARY FOR SOURCE FILE [ElementItemProvider.java]

nameclass, %method, %block, %line, %
ElementItemProvider.java0%   (0/1)0%   (0/7)0%   (0/73)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ElementItemProvider0%   (0/1)0%   (0/7)0%   (0/73)0%   (0/23)
ElementItemProvider (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)
getText (Object): String 0%   (0/1)0%   (0/4)0%   (0/1)
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.EMOFFactory;
11import EMOF.EMOFPackage;
12import EMOF.Element;
13 
14import java.util.Collection;
15import java.util.List;
16 
17import org.eclipse.emf.common.notify.AdapterFactory;
18import org.eclipse.emf.common.notify.Notification;
19 
20import org.eclipse.emf.ecore.EStructuralFeature;
21 
22import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
23import org.eclipse.emf.edit.provider.IItemLabelProvider;
24import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
25import org.eclipse.emf.edit.provider.IItemPropertySource;
26import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
27import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
28import org.eclipse.emf.edit.provider.ViewerNotification;
29 
30/**
31 * This is the item provider adapter for a {@link EMOF.Element} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class ElementItemProvider
37        extends ObjectItemProvider
38        implements
39                IEditingDomainItemProvider,
40                IStructuredItemContentProvider,
41                ITreeItemContentProvider,
42                IItemLabelProvider,
43                IItemPropertySource {
44        /**
45         * This constructs an instance from a factory and a notifier.
46         * <!-- begin-user-doc -->
47         * <!-- end-user-doc -->
48         * @generated
49         */
50        public ElementItemProvider(AdapterFactory adapterFactory) {
51                super(adapterFactory);
52        }
53 
54        /**
55         * This returns the property descriptors for the adapted class.
56         * <!-- begin-user-doc -->
57         * <!-- end-user-doc -->
58         * @generated
59         */
60        @Override
61        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
62                if (itemPropertyDescriptors == null) {
63                        super.getPropertyDescriptors(object);
64 
65                }
66                return itemPropertyDescriptors;
67        }
68 
69        /**
70         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
71         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
72         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @generated
76         */
77        @Override
78        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
79                if (childrenFeatures == null) {
80                        super.getChildrenFeatures(object);
81                        childrenFeatures.add(EMOFPackage.Literals.ELEMENT__OWNED_COMMENT);
82                }
83                return childrenFeatures;
84        }
85 
86        /**
87         * <!-- begin-user-doc -->
88         * <!-- end-user-doc -->
89         * @generated
90         */
91        @Override
92        protected EStructuralFeature getChildFeature(Object object, Object child) {
93                // Check the type of the specified child object and return the proper feature to use for
94                // adding (see {@link AddCommand}) it as a child.
95 
96                return super.getChildFeature(object, child);
97        }
98 
99        /**
100         * This returns the label text for the adapted class.
101         * <!-- begin-user-doc -->
102         * <!-- end-user-doc -->
103         * @generated
104         */
105        @Override
106        public String getText(Object object) {
107                return getString("_UI_Element_type");
108        }
109 
110        /**
111         * This handles model notifications by calling {@link #updateChildren} to update any cached
112         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
113         * <!-- begin-user-doc -->
114         * <!-- end-user-doc -->
115         * @generated
116         */
117        @Override
118        public void notifyChanged(Notification notification) {
119                updateChildren(notification);
120 
121                switch (notification.getFeatureID(Element.class)) {
122                        case EMOFPackage.ELEMENT__OWNED_COMMENT:
123                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
124                                return;
125                }
126                super.notifyChanged(notification);
127        }
128 
129        /**
130         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
131         * that can be created under this object.
132         * <!-- begin-user-doc -->
133         * <!-- end-user-doc -->
134         * @generated
135         */
136        @Override
137        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
138                super.collectNewChildDescriptors(newChildDescriptors, object);
139 
140                newChildDescriptors.add
141                        (createChildParameter
142                                (EMOFPackage.Literals.ELEMENT__OWNED_COMMENT,
143                                 EMOFFactory.eINSTANCE.createComment()));
144        }
145 
146}

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