EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][edu.kit.ipd.sdq.completionfeaturemodel.provider]

COVERAGE SUMMARY FOR SOURCE FILE [CompletionSimpleItemProvider.java]

nameclass, %method, %block, %line, %
CompletionSimpleItemProvider.java0%   (0/1)0%   (0/8)0%   (0/103)0%   (0/31)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompletionSimpleItemProvider0%   (0/1)0%   (0/8)0%   (0/103)0%   (0/31)
CompletionSimpleItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/21)0%   (0/10)
getCreateChildText (Object, Object, Object, Collection): String 0%   (0/1)0%   (0/47)0%   (0/10)
getImage (Object): Object 0%   (0/1)0%   (0/8)0%   (0/1)
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/4)0%   (0/1)
notifyChanged (Notification): void 0%   (0/1)0%   (0/7)0%   (0/3)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package edu.kit.ipd.sdq.completionfeaturemodel.provider;
8 
9 
10import de.uka.ipd.sdq.featuremodel.featuremodelPackage;
11 
12import de.uka.ipd.sdq.featuremodel.provider.SimpleItemProvider;
13 
14import edu.kit.ipd.sdq.completionfeaturemodel.completionfeaturemodelFactory;
15 
16import java.util.Collection;
17import java.util.List;
18 
19import org.eclipse.emf.common.notify.AdapterFactory;
20import org.eclipse.emf.common.notify.Notification;
21 
22import org.eclipse.emf.common.util.ResourceLocator;
23 
24import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
25import org.eclipse.emf.edit.provider.IItemColorProvider;
26import org.eclipse.emf.edit.provider.IItemLabelProvider;
27import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
28import org.eclipse.emf.edit.provider.IItemPropertySource;
29import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
30import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
31 
32/**
33 * This is the item provider adapter for a {@link edu.kit.ipd.sdq.completionfeaturemodel.CompletionSimple} object.
34 * <!-- begin-user-doc -->
35 * <!-- end-user-doc -->
36 * @generated
37 */
38public class CompletionSimpleItemProvider
39        extends SimpleItemProvider
40        implements
41                IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider {
42        /**
43         * This constructs an instance from a factory and a notifier.
44         * <!-- begin-user-doc -->
45         * <!-- end-user-doc -->
46         * @generated
47         */
48        public CompletionSimpleItemProvider(AdapterFactory adapterFactory) {
49                super(adapterFactory);
50        }
51 
52        /**
53         * This returns the property descriptors for the adapted class.
54         * <!-- begin-user-doc -->
55         * <!-- end-user-doc -->
56         * @generated
57         */
58        @Override
59        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
60                if (itemPropertyDescriptors == null) {
61                        super.getPropertyDescriptors(object);
62 
63                }
64                return itemPropertyDescriptors;
65        }
66 
67        /**
68         * This returns CompletionSimple.gif.
69         * <!-- begin-user-doc -->
70         * <!-- end-user-doc -->
71         * @generated
72         */
73        @Override
74        public Object getImage(Object object) {
75                return overlayImage(object, getResourceLocator().getImage("full/obj16/CompletionSimple"));
76        }
77 
78        /**
79         * This returns the label text for the adapted class.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        @Override
85        public String getText(Object object) {
86                return getString("_UI_CompletionSimple_type");
87        }
88 
89        /**
90         * This handles model notifications by calling {@link #updateChildren} to update any cached
91         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
92         * <!-- begin-user-doc -->
93         * <!-- end-user-doc -->
94         * @generated
95         */
96        @Override
97        public void notifyChanged(Notification notification) {
98                updateChildren(notification);
99                super.notifyChanged(notification);
100        }
101 
102        /**
103         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
104         * that can be created under this object.
105         * <!-- begin-user-doc -->
106         * <!-- end-user-doc -->
107         * @generated
108         */
109        @Override
110        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
111                super.collectNewChildDescriptors(newChildDescriptors, object);
112 
113                newChildDescriptors.add
114                        (createChildParameter
115                                (featuremodelPackage.Literals.SIMPLE__OPTIONAL_CHILDREN,
116                                 completionfeaturemodelFactory.eINSTANCE.createCompletionFeature()));
117 
118                newChildDescriptors.add
119                        (createChildParameter
120                                (featuremodelPackage.Literals.SIMPLE__MANDATORY_CHILDREN,
121                                 completionfeaturemodelFactory.eINSTANCE.createCompletionFeature()));
122        }
123 
124        /**
125         * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
126         * <!-- begin-user-doc -->
127         * <!-- end-user-doc -->
128         * @generated
129         */
130        @Override
131        public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
132                Object childFeature = feature;
133                Object childObject = child;
134 
135                boolean qualify =
136                        childFeature == featuremodelPackage.Literals.SIMPLE__OPTIONAL_CHILDREN ||
137                        childFeature == featuremodelPackage.Literals.SIMPLE__MANDATORY_CHILDREN;
138 
139                if (qualify) {
140                        return getString
141                                ("_UI_CreateChild_text2",
142                                 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
143                }
144                return super.getCreateChildText(owner, feature, child, selection);
145        }
146 
147        /**
148         * Return the resource locator for this item provider's resources.
149         * <!-- begin-user-doc -->
150         * <!-- end-user-doc -->
151         * @generated
152         */
153        @Override
154        public ResourceLocator getResourceLocator() {
155                return CompletionfeaturemodelEditPlugin.INSTANCE;
156        }
157 
158}

[all classes][edu.kit.ipd.sdq.completionfeaturemodel.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov