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

nameclass, %method, %block, %line, %
InfrastructureSignatureItemProvider.java0%   (0/1)0%   (0/8)0%   (0/103)0%   (0/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InfrastructureSignatureItemProvider0%   (0/1)0%   (0/8)0%   (0/103)0%   (0/27)
InfrastructureSignatureItemProvider (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)
getImage (Object): Object 0%   (0/1)0%   (0/8)0%   (0/1)
getPropertyDescriptors (Object): List 0%   (0/1)0%   (0/10)0%   (0/3)
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 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.IEditingDomainItemProvider;
16import org.eclipse.emf.edit.provider.IItemLabelProvider;
17import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
18import org.eclipse.emf.edit.provider.IItemPropertySource;
19import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
20import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
21import org.eclipse.emf.edit.provider.ViewerNotification;
22 
23import de.uka.ipd.sdq.pcm.repository.InfrastructureSignature;
24import de.uka.ipd.sdq.pcm.repository.RepositoryFactory;
25import de.uka.ipd.sdq.pcm.repository.RepositoryPackage;
26 
27/**
28 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.repository.InfrastructureSignature} object.
29 * <!-- begin-user-doc -->
30 * <!-- end-user-doc -->
31 * @generated
32 */
33public class InfrastructureSignatureItemProvider
34        extends SignatureItemProvider
35        implements
36                IEditingDomainItemProvider,
37                IStructuredItemContentProvider,
38                ITreeItemContentProvider,
39                IItemLabelProvider,
40                IItemPropertySource {
41        /**
42         * <!-- begin-user-doc -->
43         * <!-- end-user-doc -->
44         * @generated
45         */
46        public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany";
47 
48        /**
49         * This constructs an instance from a factory and a notifier.
50         * <!-- begin-user-doc -->
51         * <!-- end-user-doc -->
52         * @generated
53         */
54        public InfrastructureSignatureItemProvider(AdapterFactory adapterFactory) {
55                super(adapterFactory);
56        }
57 
58        /**
59         * This returns the property descriptors for the adapted class.
60         * <!-- begin-user-doc -->
61         * <!-- end-user-doc -->
62         * @generated
63         */
64        @Override
65        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
66                if (itemPropertyDescriptors == null) {
67                        super.getPropertyDescriptors(object);
68 
69                }
70                return itemPropertyDescriptors;
71        }
72 
73        /**
74         * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
75         * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
76         * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
77         * <!-- begin-user-doc -->
78         * <!-- end-user-doc -->
79         * @generated
80         */
81        @Override
82        public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
83                if (childrenFeatures == null) {
84                        super.getChildrenFeatures(object);
85                        childrenFeatures.add(RepositoryPackage.Literals.INFRASTRUCTURE_SIGNATURE__PARAMETERS_INFRASTRUCTURE_SIGNATURE);
86                }
87                return childrenFeatures;
88        }
89 
90        /**
91         * <!-- begin-user-doc -->
92         * <!-- end-user-doc -->
93         * @generated
94         */
95        @Override
96        protected EStructuralFeature getChildFeature(Object object, Object child) {
97                // Check the type of the specified child object and return the proper feature to use for
98                // adding (see {@link AddCommand}) it as a child.
99 
100                return super.getChildFeature(object, child);
101        }
102 
103        /**
104         * This returns InfrastructureSignature.gif.
105         * <!-- begin-user-doc -->
106         * <!-- end-user-doc -->
107         * @generated
108         */
109        @Override
110        public Object getImage(Object object) {
111                return overlayImage(object, getResourceLocator().getImage("full/obj16/InfrastructureSignature"));
112        }
113 
114        /**
115         * This returns the label text for the adapted class.
116         * <!-- begin-user-doc -->
117         * <!-- end-user-doc -->
118         * @generated
119         */
120        @Override
121        public String getText(Object object) {
122                String label = ((InfrastructureSignature)object).getId();
123                return label == null || label.length() == 0 ?
124                        getString("_UI_InfrastructureSignature_type") :
125                        getString("_UI_InfrastructureSignature_type") + " " + label;
126        }
127 
128        /**
129         * This handles model notifications by calling {@link #updateChildren} to update any cached
130         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
131         * <!-- begin-user-doc -->
132         * <!-- end-user-doc -->
133         * @generated
134         */
135        @Override
136        public void notifyChanged(Notification notification) {
137                updateChildren(notification);
138 
139                switch (notification.getFeatureID(InfrastructureSignature.class)) {
140                        case RepositoryPackage.INFRASTRUCTURE_SIGNATURE__PARAMETERS_INFRASTRUCTURE_SIGNATURE:
141                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
142                                return;
143                }
144                super.notifyChanged(notification);
145        }
146 
147        /**
148         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
149         * that can be created under this object.
150         * <!-- begin-user-doc -->
151         * <!-- end-user-doc -->
152         * @generated
153         */
154        @Override
155        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
156                super.collectNewChildDescriptors(newChildDescriptors, object);
157 
158                newChildDescriptors.add
159                        (createChildParameter
160                                (RepositoryPackage.Literals.INFRASTRUCTURE_SIGNATURE__PARAMETERS_INFRASTRUCTURE_SIGNATURE,
161                                 RepositoryFactory.eINSTANCE.createParameter()));
162        }
163 
164}

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