| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.sensitivity.provider; |
| 8 | |
| 9 | |
| 10 | import java.util.Collection; |
| 11 | import java.util.List; |
| 12 | |
| 13 | import org.eclipse.emf.common.notify.AdapterFactory; |
| 14 | import org.eclipse.emf.common.notify.Notification; |
| 15 | import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
| 16 | import org.eclipse.emf.edit.provider.IItemLabelProvider; |
| 17 | import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
| 18 | import org.eclipse.emf.edit.provider.IItemPropertySource; |
| 19 | import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
| 20 | import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
| 21 | |
| 22 | import de.uka.ipd.sdq.sensitivity.NetworkReliabilityParameter; |
| 23 | |
| 24 | /** |
| 25 | * This is the item provider adapter for a {@link de.uka.ipd.sdq.sensitivity.NetworkReliabilityParameter} object. |
| 26 | * <!-- begin-user-doc --> |
| 27 | * <!-- end-user-doc --> |
| 28 | * @generated |
| 29 | */ |
| 30 | public class NetworkReliabilityParameterItemProvider |
| 31 | extends SingleSensitivityParameterItemProvider |
| 32 | implements |
| 33 | IEditingDomainItemProvider, |
| 34 | IStructuredItemContentProvider, |
| 35 | ITreeItemContentProvider, |
| 36 | IItemLabelProvider, |
| 37 | IItemPropertySource { |
| 38 | /** |
| 39 | * This constructs an instance from a factory and a notifier. |
| 40 | * <!-- begin-user-doc --> |
| 41 | * <!-- end-user-doc --> |
| 42 | * @generated |
| 43 | */ |
| 44 | public NetworkReliabilityParameterItemProvider(AdapterFactory adapterFactory) { |
| 45 | super(adapterFactory); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * This returns the property descriptors for the adapted class. |
| 50 | * <!-- begin-user-doc --> |
| 51 | * <!-- end-user-doc --> |
| 52 | * @generated |
| 53 | */ |
| 54 | @Override |
| 55 | public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
| 56 | if (itemPropertyDescriptors == null) { |
| 57 | super.getPropertyDescriptors(object); |
| 58 | |
| 59 | } |
| 60 | return itemPropertyDescriptors; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * This returns NetworkReliabilityParameter.gif. |
| 65 | * <!-- begin-user-doc --> |
| 66 | * <!-- end-user-doc --> |
| 67 | * @generated |
| 68 | */ |
| 69 | @Override |
| 70 | public Object getImage(Object object) { |
| 71 | return overlayImage(object, getResourceLocator().getImage("full/obj16/NetworkReliabilityParameter")); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * This returns the label text for the adapted class. |
| 76 | * <!-- begin-user-doc --> |
| 77 | * <!-- end-user-doc --> |
| 78 | * @generated not |
| 79 | */ |
| 80 | @Override |
| 81 | public String getText(Object object) { |
| 82 | return ((NetworkReliabilityParameter)object).getEntityName() |
| 83 | + " [ID: " + ((NetworkReliabilityParameter)object).getId() + "]" |
| 84 | + " <" + getString("_UI_NetworkReliabilityParameter_type") + ">"; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * This handles model notifications by calling {@link #updateChildren} to update any cached |
| 89 | * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
| 90 | * <!-- begin-user-doc --> |
| 91 | * <!-- end-user-doc --> |
| 92 | * @generated |
| 93 | */ |
| 94 | @Override |
| 95 | public void notifyChanged(Notification notification) { |
| 96 | updateChildren(notification); |
| 97 | super.notifyChanged(notification); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
| 102 | * that can be created under this object. |
| 103 | * <!-- begin-user-doc --> |
| 104 | * <!-- end-user-doc --> |
| 105 | * @generated |
| 106 | */ |
| 107 | @Override |
| 108 | protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
| 109 | super.collectNewChildDescriptors(newChildDescriptors, object); |
| 110 | } |
| 111 | |
| 112 | } |