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

COVERAGE SUMMARY FOR SOURCE FILE [FailureOccurrenceDescriptionItemProvider.java]

nameclass, %method, %block, %line, %
FailureOccurrenceDescriptionItemProvider.java0%   (0/1)0%   (0/8)0%   (0/99)0%   (0/32)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FailureOccurrenceDescriptionItemProvider0%   (0/1)0%   (0/8)0%   (0/99)0%   (0/32)
FailureOccurrenceDescriptionItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
addFailureProbabilityPropertyDescriptor (Object): void 0%   (0/1)0%   (0/28)0%   (0/14)
collectNewChildDescriptors (Collection, Object): void 0%   (0/1)0%   (0/5)0%   (0/2)
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/17)0%   (0/2)
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.reliability.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.common.util.ResourceLocator;
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.ItemProviderAdapter;
24import org.eclipse.emf.edit.provider.ViewerNotification;
25 
26import de.uka.ipd.sdq.pcm.core.provider.PalladioComponentModelEditPlugin;
27import de.uka.ipd.sdq.pcm.reliability.FailureOccurrenceDescription;
28import de.uka.ipd.sdq.pcm.reliability.ReliabilityPackage;
29 
30/**
31 * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.reliability.FailureOccurrenceDescription} object.
32 * <!-- begin-user-doc -->
33 * <!-- end-user-doc -->
34 * @generated
35 */
36public class FailureOccurrenceDescriptionItemProvider
37        extends ItemProviderAdapter
38        implements
39                IEditingDomainItemProvider,
40                IStructuredItemContentProvider,
41                ITreeItemContentProvider,
42                IItemLabelProvider,
43                IItemPropertySource {
44        /**
45         * <!-- begin-user-doc -->
46         * <!-- end-user-doc -->
47         * @generated
48         */
49        public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany";
50 
51        /**
52         * This constructs an instance from a factory and a notifier.
53         * <!-- begin-user-doc -->
54         * <!-- end-user-doc -->
55         * @generated
56         */
57        public FailureOccurrenceDescriptionItemProvider(AdapterFactory adapterFactory) {
58                super(adapterFactory);
59        }
60 
61        /**
62         * This returns the property descriptors for the adapted class.
63         * <!-- begin-user-doc -->
64         * <!-- end-user-doc -->
65         * @generated
66         */
67        @Override
68        public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
69                if (itemPropertyDescriptors == null) {
70                        super.getPropertyDescriptors(object);
71 
72                        addFailureProbabilityPropertyDescriptor(object);
73                }
74                return itemPropertyDescriptors;
75        }
76 
77        /**
78         * This adds a property descriptor for the Failure Probability feature.
79         * <!-- begin-user-doc -->
80         * <!-- end-user-doc -->
81         * @generated
82         */
83        protected void addFailureProbabilityPropertyDescriptor(Object object) {
84                itemPropertyDescriptors.add
85                        (createItemPropertyDescriptor
86                                (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
87                                 getResourceLocator(),
88                                 getString("_UI_FailureOccurrenceDescription_failureProbability_feature"),
89                                 getString("_UI_PropertyDescriptor_description", "_UI_FailureOccurrenceDescription_failureProbability_feature", "_UI_FailureOccurrenceDescription_type"),
90                                 ReliabilityPackage.Literals.FAILURE_OCCURRENCE_DESCRIPTION__FAILURE_PROBABILITY,
91                                 true,
92                                 false,
93                                 false,
94                                 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
95                                 null,
96                                 null));
97        }
98 
99        /**
100         * This returns FailureOccurrenceDescription.gif.
101         * <!-- begin-user-doc -->
102         * <!-- end-user-doc -->
103         * @generated
104         */
105        @Override
106        public Object getImage(Object object) {
107                return overlayImage(object, getResourceLocator().getImage("full/obj16/FailureOccurrenceDescription"));
108        }
109 
110        /**
111         * This returns the label text for the adapted class.
112         * <!-- begin-user-doc -->
113         * <!-- end-user-doc -->
114         * @generated
115         */
116        @Override
117        public String getText(Object object) {
118                FailureOccurrenceDescription failureOccurrenceDescription = (FailureOccurrenceDescription)object;
119                return getString("_UI_FailureOccurrenceDescription_type") + " " + failureOccurrenceDescription.getFailureProbability();
120        }
121 
122        /**
123         * This handles model notifications by calling {@link #updateChildren} to update any cached
124         * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
125         * <!-- begin-user-doc -->
126         * <!-- end-user-doc -->
127         * @generated
128         */
129        @Override
130        public void notifyChanged(Notification notification) {
131                updateChildren(notification);
132 
133                switch (notification.getFeatureID(FailureOccurrenceDescription.class)) {
134                        case ReliabilityPackage.FAILURE_OCCURRENCE_DESCRIPTION__FAILURE_PROBABILITY:
135                                fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
136                                return;
137                }
138                super.notifyChanged(notification);
139        }
140 
141        /**
142         * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
143         * that can be created under this object.
144         * <!-- begin-user-doc -->
145         * <!-- end-user-doc -->
146         * @generated
147         */
148        @Override
149        protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
150                super.collectNewChildDescriptors(newChildDescriptors, object);
151        }
152 
153        /**
154         * Return the resource locator for this item provider's resources.
155         * <!-- begin-user-doc -->
156         * <!-- end-user-doc -->
157         * @generated
158         */
159        @Override
160        public ResourceLocator getResourceLocator() {
161                return PalladioComponentModelEditPlugin.INSTANCE;
162        }
163 
164}

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