EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.repository.provider]

COVERAGE SUMMARY FOR SOURCE FILE [ImplementationComponentTypeItemProvider.java]

nameclass, %method, %block, %line, %
ImplementationComponentTypeItemProvider.java0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/58)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ImplementationComponentTypeItemProvider0%   (0/1)0%   (0/9)0%   (0/168)0%   (0/58)
ImplementationComponentTypeItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addComponentTypePropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
addParentCompleteComponentTypesPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
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/16)0%   (0/5)
getText (Object): String 0%   (0/1)0%   (0/26)0%   (0/4)
notifyChanged (Notification): void 0%   (0/1)0%   (0/33)0%   (0/8)

1/**
2 * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.pcm.repository.provider;
7 
8 
9import java.util.Collection;
10import java.util.List;
11 
12import org.eclipse.emf.common.notify.AdapterFactory;
13import org.eclipse.emf.common.notify.Notification;
14import org.eclipse.emf.ecore.EStructuralFeature;
15import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
16import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
17import org.eclipse.emf.edit.provider.IItemLabelProvider;
18import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
19import org.eclipse.emf.edit.provider.IItemPropertySource;
20import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
21import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
22import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
23import org.eclipse.emf.edit.provider.ViewerNotification;
24 
25import de.uka.ipd.sdq.pcm.parameter.ParameterFactory;
26import de.uka.ipd.sdq.pcm.repository.ImplementationComponentType;
27import de.uka.ipd.sdq.pcm.repository.RepositoryPackage;
28 
29/**
30 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.repository.ImplementationComponentType} object.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
33 * @generated
34 */
35public class ImplementationComponentTypeItemProvider
36        extends RepositoryComponentItemProvider
37        implements
38                IEditingDomainItemProvider,
39                IStructuredItemContentProvider,
40                ITreeItemContentProvider,
41                IItemLabelProvider,
42                IItemPropertySource {
43        /**
44         * <!-- begin-user-doc -->
45         * <!-- end-user-doc -->
46         * @generated
47         */
48        public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany";
49 
50        /**
51         * This constructs an instance from a factory and a notifier.
52         * <!-- begin-user-doc -->
53         * <!-- end-user-doc -->
54         * @generated
55         */
56        public ImplementationComponentTypeItemProvider(AdapterFactory adapterFactory) {
57                super(adapterFactory);
58        }
59 
60        /**
61         * This returns the property descriptors for the adapted class.
62         * <!-- begin-user-doc -->
63         * <!-- end-user-doc -->
64         * @generated
65         */
66        @Override
67        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
68                if (itemPropertyDescriptors == null) {
69                        super.getPropertyDescriptors(object);
70 
71                        addParentCompleteComponentTypesPropertyDescriptor(object);
72                        addComponentTypePropertyDescriptor(object);
73                }
74                return itemPropertyDescriptors;
75        }
76 
77        /**
78         * This adds a property descriptor for the Parent Complete Component Types feature.
79         * <!-- begin-user-doc -->
80         * <!-- end-user-doc -->
81         * @generated
82         */
83        protected void addParentCompleteComponentTypesPropertyDescriptor(Object object) {
84                itemPropertyDescriptors.add
85                        (createItemPropertyDescriptor
86                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
87                                 getResourceLocator(),
88                                 getString("_UI_ImplementationComponentType_parentCompleteComponentTypes_feature"),
89                                 getString("_UI_PropertyDescriptor_description", "_UI_ImplementationComponentType_parentCompleteComponentTypes_feature", "_UI_ImplementationComponentType_type"),
90                                 RepositoryPackage.Literals.IMPLEMENTATION_COMPONENT_TYPE__PARENT_COMPLETE_COMPONENT_TYPES,
91                                 true,
92                                 false,
93                                 true,
94                                 null,
95                                 null,
96                                 null));
97        }
98 
99        /**
100         * This adds a property descriptor for the Component Type feature.
101         * <!-- begin-user-doc -->
102         * <!-- end-user-doc -->
103         * @generated
104         */
105        protected void addComponentTypePropertyDescriptor(Object object) {
106                itemPropertyDescriptors.add
107                        (createItemPropertyDescriptor
108                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
109                                 getResourceLocator(),
110                                 getString("_UI_ImplementationComponentType_componentType_feature"),
111                                 getString("_UI_PropertyDescriptor_description", "_UI_ImplementationComponentType_componentType_feature", "_UI_ImplementationComponentType_type"),
112                                 RepositoryPackage.Literals.IMPLEMENTATION_COMPONENT_TYPE__COMPONENT_TYPE,
113                                 true,
114                                 false,
115                                 false,
116                                 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
117                                 null,
118                                 null));
119        }
120 
121        /**
122         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
123         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
124         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
125         * <!-- begin-user-doc -->
126         * <!-- end-user-doc -->
127         * @generated
128         */
129        @Override
130        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
131                if (childrenFeatures == null) {
132                        super.getChildrenFeatures(object);
133                        childrenFeatures.add(RepositoryPackage.Literals.IMPLEMENTATION_COMPONENT_TYPE__COMPONENT_PARAMETER_USAGE_IMPLEMENTATION_COMPONENT_TYPE);
134                }
135                return childrenFeatures;
136        }
137 
138        /**
139         * <!-- begin-user-doc -->
140         * <!-- end-user-doc -->
141         * @generated
142         */
143        @Override
144        protected EStructuralFeature getChildFeature(Object object, Object child) {
145                // Check the type of the specified child object and return the proper feature to use for
146                // adding (see {@link AddCommand}) it as a child.
147 
148                return super.getChildFeature(object, child);
149        }
150 
151        /**
152         * This returns the label text for the adapted class.
153         * <!-- begin-user-doc -->
154         * <!-- end-user-doc -->
155         * @generated
156         */
157        @Override
158        public String getText(Object object) {
159                String label = ((ImplementationComponentType)object).getId();
160                return label == null || label.length() == 0 ?
161                        getString("_UI_ImplementationComponentType_type") :
162                        getString("_UI_ImplementationComponentType_type") + " " + label;
163        }
164 
165        /**
166         * This handles model notifications by calling {@link #updateChildren} to update any cached
167         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
168         * <!-- begin-user-doc -->
169         * <!-- end-user-doc -->
170         * @generated
171         */
172        @Override
173        public void notifyChanged(Notification notification) {
174                updateChildren(notification);
175 
176                switch (notification.getFeatureID(ImplementationComponentType.class)) {
177                        case RepositoryPackage.IMPLEMENTATION_COMPONENT_TYPE__COMPONENT_TYPE:
178                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
179                                return;
180                        case RepositoryPackage.IMPLEMENTATION_COMPONENT_TYPE__COMPONENT_PARAMETER_USAGE_IMPLEMENTATION_COMPONENT_TYPE:
181                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
182                                return;
183                }
184                super.notifyChanged(notification);
185        }
186 
187        /**
188         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
189         * that can be created under this object.
190         * <!-- begin-user-doc -->
191         * <!-- end-user-doc -->
192         * @generated
193         */
194        @Override
195        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
196                super.collectNewChildDescriptors(newChildDescriptors, object);
197 
198                newChildDescriptors.add
199                        (createChildParameter
200                                (RepositoryPackage.Literals.IMPLEMENTATION_COMPONENT_TYPE__COMPONENT_PARAMETER_USAGE_IMPLEMENTATION_COMPONENT_TYPE,
201                                 ParameterFactory.eINSTANCE.createVariableUsage()));
202        }
203 
204}

[all classes][de.uka.ipd.sdq.pcm.repository.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov