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