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

COVERAGE SUMMARY FOR SOURCE FILE [CharacterisedVariableItemProvider.java]

nameclass, %method, %block, %line, %
CharacterisedVariableItemProvider.java0%   (0/1)0%   (0/8)0%   (0/115)0%   (0/35)

COVERAGE BREAKDOWN BY CLASS AND METHOD

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

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