| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.stoex.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 | /** |
| 23 | * This is the item provider adapter for a {@link de.uka.ipd.sdq.stoex.Atom} object. |
| 24 | * <!-- begin-user-doc --> |
| 25 | * <!-- end-user-doc --> |
| 26 | * @generated |
| 27 | */ |
| 28 | public class AtomItemProvider |
| 29 | extends UnaryItemProvider |
| 30 | implements |
| 31 | IEditingDomainItemProvider, |
| 32 | IStructuredItemContentProvider, |
| 33 | ITreeItemContentProvider, |
| 34 | IItemLabelProvider, |
| 35 | IItemPropertySource { |
| 36 | /** |
| 37 | * <!-- begin-user-doc --> |
| 38 | * <!-- end-user-doc --> |
| 39 | * @generated |
| 40 | */ |
| 41 | public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe"; |
| 42 | |
| 43 | /** |
| 44 | * This constructs an instance from a factory and a notifier. |
| 45 | * <!-- begin-user-doc --> |
| 46 | * <!-- end-user-doc --> |
| 47 | * @generated |
| 48 | */ |
| 49 | public AtomItemProvider(AdapterFactory adapterFactory) { |
| 50 | super(adapterFactory); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * This returns the property descriptors for the adapted class. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * <!-- end-user-doc --> |
| 57 | * @generated |
| 58 | */ |
| 59 | @Override |
| 60 | public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
| 61 | if (itemPropertyDescriptors == null) { |
| 62 | super.getPropertyDescriptors(object); |
| 63 | |
| 64 | } |
| 65 | return itemPropertyDescriptors; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * This returns the label text for the adapted class. |
| 70 | * <!-- begin-user-doc --> |
| 71 | * <!-- end-user-doc --> |
| 72 | * @generated |
| 73 | */ |
| 74 | @Override |
| 75 | public String getText(Object object) { |
| 76 | return getString("_UI_Atom_type"); |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * This handles model notifications by calling {@link #updateChildren} to update any cached |
| 81 | * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
| 82 | * <!-- begin-user-doc --> |
| 83 | * <!-- end-user-doc --> |
| 84 | * @generated |
| 85 | */ |
| 86 | @Override |
| 87 | public void notifyChanged(Notification notification) { |
| 88 | updateChildren(notification); |
| 89 | super.notifyChanged(notification); |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
| 94 | * that can be created under this object. |
| 95 | * <!-- begin-user-doc --> |
| 96 | * <!-- end-user-doc --> |
| 97 | * @generated |
| 98 | */ |
| 99 | @Override |
| 100 | protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
| 101 | super.collectNewChildDescriptors(newChildDescriptors, object); |
| 102 | } |
| 103 | |
| 104 | } |