1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.qosannotations.qos_performance.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.ComposeableAdapterFactory; |
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.pcm.qosannotations.qos_performance.Qos_performancePackage; |
23 | |
24 | /** |
25 | * This is the item provider adapter for a {@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.ComponentSpecifiedExecutionTime} object. |
26 | * <!-- begin-user-doc --> |
27 | * <!-- end-user-doc --> |
28 | * @generated |
29 | */ |
30 | public class ComponentSpecifiedExecutionTimeItemProvider |
31 | extends SpecifiedExecutionTimeItemProvider |
32 | implements |
33 | IEditingDomainItemProvider, |
34 | IStructuredItemContentProvider, |
35 | ITreeItemContentProvider, |
36 | IItemLabelProvider, |
37 | IItemPropertySource { |
38 | /** |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @generated |
42 | */ |
43 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
44 | |
45 | /** |
46 | * This constructs an instance from a factory and a notifier. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public ComponentSpecifiedExecutionTimeItemProvider(AdapterFactory adapterFactory) { |
52 | super(adapterFactory); |
53 | } |
54 | |
55 | /** |
56 | * This returns the property descriptors for the adapted class. |
57 | * <!-- begin-user-doc --> |
58 | * <!-- end-user-doc --> |
59 | * @generated |
60 | */ |
61 | @Override |
62 | public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
63 | if (itemPropertyDescriptors == null) { |
64 | super.getPropertyDescriptors(object); |
65 | |
66 | addAssemblyContext_ComponentSpecifiedExecutionTimePropertyDescriptor(object); |
67 | } |
68 | return itemPropertyDescriptors; |
69 | } |
70 | |
71 | /** |
72 | * This adds a property descriptor for the Assembly Context Component Specified Execution Time feature. |
73 | * <!-- begin-user-doc --> |
74 | * <!-- end-user-doc --> |
75 | * @generated |
76 | */ |
77 | protected void addAssemblyContext_ComponentSpecifiedExecutionTimePropertyDescriptor(Object object) { |
78 | itemPropertyDescriptors.add |
79 | (createItemPropertyDescriptor |
80 | (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
81 | getResourceLocator(), |
82 | getString("_UI_ComponentSpecifiedExecutionTime_assemblyContext_ComponentSpecifiedExecutionTime_feature"), |
83 | getString("_UI_PropertyDescriptor_description", "_UI_ComponentSpecifiedExecutionTime_assemblyContext_ComponentSpecifiedExecutionTime_feature", "_UI_ComponentSpecifiedExecutionTime_type"), |
84 | Qos_performancePackage.Literals.COMPONENT_SPECIFIED_EXECUTION_TIME__ASSEMBLY_CONTEXT_COMPONENT_SPECIFIED_EXECUTION_TIME, |
85 | true, |
86 | false, |
87 | true, |
88 | null, |
89 | null, |
90 | null)); |
91 | } |
92 | |
93 | /** |
94 | * This returns ComponentSpecifiedExecutionTime.gif. |
95 | * <!-- begin-user-doc --> |
96 | * <!-- end-user-doc --> |
97 | * @generated |
98 | */ |
99 | @Override |
100 | public Object getImage(Object object) { |
101 | return overlayImage(object, getResourceLocator().getImage("full/obj16/ComponentSpecifiedExecutionTime")); |
102 | } |
103 | |
104 | /** |
105 | * This returns the label text for the adapted class. |
106 | * <!-- begin-user-doc --> |
107 | * <!-- end-user-doc --> |
108 | * @generated |
109 | */ |
110 | @Override |
111 | public String getText(Object object) { |
112 | return getString("_UI_ComponentSpecifiedExecutionTime_type"); |
113 | } |
114 | |
115 | /** |
116 | * This handles model notifications by calling {@link #updateChildren} to update any cached |
117 | * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
118 | * <!-- begin-user-doc --> |
119 | * <!-- end-user-doc --> |
120 | * @generated |
121 | */ |
122 | @Override |
123 | public void notifyChanged(Notification notification) { |
124 | updateChildren(notification); |
125 | super.notifyChanged(notification); |
126 | } |
127 | |
128 | /** |
129 | * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
130 | * that can be created under this object. |
131 | * <!-- begin-user-doc --> |
132 | * <!-- end-user-doc --> |
133 | * @generated |
134 | */ |
135 | @Override |
136 | protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
137 | super.collectNewChildDescriptors(newChildDescriptors, object); |
138 | } |
139 | |
140 | } |