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