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.common.util.ResourceLocator; |
16 | import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
17 | import org.eclipse.emf.edit.provider.IItemLabelProvider; |
18 | import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
19 | import org.eclipse.emf.edit.provider.IItemPropertySource; |
20 | import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
21 | import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
22 | import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
23 | |
24 | /** |
25 | * This is the item provider adapter for a {@link de.uka.ipd.sdq.stoex.Expression} object. |
26 | * <!-- begin-user-doc --> |
27 | * <!-- end-user-doc --> |
28 | * @generated |
29 | */ |
30 | public class ExpressionItemProvider |
31 | extends ItemProviderAdapter |
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 2007-2009, SDQ, IPD, U Karlsruhe"; |
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 ExpressionItemProvider(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 | } |
67 | return itemPropertyDescriptors; |
68 | } |
69 | |
70 | /** |
71 | * This returns the label text for the adapted class. |
72 | * <!-- begin-user-doc --> |
73 | * <!-- end-user-doc --> |
74 | * @generated |
75 | */ |
76 | @Override |
77 | public String getText(Object object) { |
78 | return getString("_UI_Expression_type"); |
79 | } |
80 | |
81 | /** |
82 | * This handles model notifications by calling {@link #updateChildren} to update any cached |
83 | * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
84 | * <!-- begin-user-doc --> |
85 | * <!-- end-user-doc --> |
86 | * @generated |
87 | */ |
88 | @Override |
89 | public void notifyChanged(Notification notification) { |
90 | updateChildren(notification); |
91 | super.notifyChanged(notification); |
92 | } |
93 | |
94 | /** |
95 | * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
96 | * that can be created under this object. |
97 | * <!-- begin-user-doc --> |
98 | * <!-- end-user-doc --> |
99 | * @generated |
100 | */ |
101 | @Override |
102 | protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
103 | super.collectNewChildDescriptors(newChildDescriptors, object); |
104 | } |
105 | |
106 | /** |
107 | * Return the resource locator for this item provider's resources. |
108 | * <!-- begin-user-doc --> |
109 | * <!-- end-user-doc --> |
110 | * @generated |
111 | */ |
112 | @Override |
113 | public ResourceLocator getResourceLocator() { |
114 | return StoexEditPlugin.INSTANCE; |
115 | } |
116 | |
117 | } |