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

COVERAGE SUMMARY FOR SOURCE FILE [RecoveryActionItemProvider.java]

nameclass, %method, %block, %line, %
RecoveryActionItemProvider.java0%   (0/1)0%   (0/10)0%   (0/136)0%   (0/43)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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