1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.provider; |
8 | |
9 | |
10 | import de.uka.ipd.sdq.pcm.designdecision.designdecisionPackage; |
11 | |
12 | import java.util.Collection; |
13 | import java.util.List; |
14 | |
15 | import org.eclipse.emf.common.notify.AdapterFactory; |
16 | import org.eclipse.emf.common.notify.Notification; |
17 | |
18 | import org.eclipse.emf.common.util.ResourceLocator; |
19 | |
20 | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
21 | import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
22 | import org.eclipse.emf.edit.provider.IItemLabelProvider; |
23 | import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
24 | import org.eclipse.emf.edit.provider.IItemPropertySource; |
25 | import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
26 | import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
27 | import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
28 | |
29 | /** |
30 | * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.designdecision.ProcessingResourceDegree} object. |
31 | * <!-- begin-user-doc --> |
32 | * <!-- end-user-doc --> |
33 | * @generated |
34 | */ |
35 | public class ProcessingResourceDegreeItemProvider |
36 | extends DegreeOfFreedomInstanceItemProvider |
37 | implements |
38 | IEditingDomainItemProvider, |
39 | IStructuredItemContentProvider, |
40 | ITreeItemContentProvider, |
41 | IItemLabelProvider, |
42 | IItemPropertySource { |
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 ProcessingResourceDegreeItemProvider(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 | addProcessingresourcetypePropertyDescriptor(object); |
65 | } |
66 | return itemPropertyDescriptors; |
67 | } |
68 | |
69 | /** |
70 | * This adds a property descriptor for the Processingresourcetype feature. |
71 | * <!-- begin-user-doc --> |
72 | * <!-- end-user-doc --> |
73 | * @generated |
74 | */ |
75 | protected void addProcessingresourcetypePropertyDescriptor(Object object) { |
76 | itemPropertyDescriptors.add |
77 | (createItemPropertyDescriptor |
78 | (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
79 | getResourceLocator(), |
80 | getString("_UI_ProcessingResourceDegree_processingresourcetype_feature"), |
81 | getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceDegree_processingresourcetype_feature", "_UI_ProcessingResourceDegree_type"), |
82 | designdecisionPackage.Literals.PROCESSING_RESOURCE_DEGREE__PROCESSINGRESOURCETYPE, |
83 | true, |
84 | false, |
85 | true, |
86 | null, |
87 | null, |
88 | null)); |
89 | } |
90 | |
91 | /** |
92 | * This returns the label text for the adapted class. |
93 | * <!-- begin-user-doc --> |
94 | * <!-- end-user-doc --> |
95 | * @generated |
96 | */ |
97 | @Override |
98 | public String getText(Object object) { |
99 | return getString("_UI_ProcessingResourceDegree_type"); |
100 | } |
101 | |
102 | /** |
103 | * This handles model notifications by calling {@link #updateChildren} to update any cached |
104 | * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
105 | * <!-- begin-user-doc --> |
106 | * <!-- end-user-doc --> |
107 | * @generated |
108 | */ |
109 | @Override |
110 | public void notifyChanged(Notification notification) { |
111 | updateChildren(notification); |
112 | super.notifyChanged(notification); |
113 | } |
114 | |
115 | /** |
116 | * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
117 | * that can be created under this object. |
118 | * <!-- begin-user-doc --> |
119 | * <!-- end-user-doc --> |
120 | * @generated |
121 | */ |
122 | @Override |
123 | protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
124 | super.collectNewChildDescriptors(newChildDescriptors, object); |
125 | } |
126 | |
127 | } |