KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > provider > DocumentRootItemProvider


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id$
6  */

7 package Olj.provider;
8
9
10 import Olj.DocumentRoot;
11 import Olj.OljFactory;
12 import Olj.OljPackage;
13
14 import java.util.Collection JavaDoc;
15 import java.util.List JavaDoc;
16
17 import org.eclipse.emf.common.notify.AdapterFactory;
18 import org.eclipse.emf.common.notify.Notification;
19
20 import org.eclipse.emf.common.util.ResourceLocator;
21
22 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
23 import org.eclipse.emf.edit.provider.IItemLabelProvider;
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 import org.eclipse.emf.edit.provider.ViewerNotification;
29
30 /**
31  * This is the item provider adpater for a {@link Olj.DocumentRoot} object.
32  * <!-- begin-user-doc -->
33  * <!-- end-user-doc -->
34  * @generated
35  */

36 public class DocumentRootItemProvider
37     extends ItemProviderAdapter
38     implements
39         IEditingDomainItemProvider,
40         IStructuredItemContentProvider,
41         ITreeItemContentProvider,
42         IItemLabelProvider,
43         IItemPropertySource {
44     /**
45      * This constructs an instance from a factory and a notifier.
46      * <!-- begin-user-doc -->
47      * <!-- end-user-doc -->
48      * @generated
49      */

50     public DocumentRootItemProvider(AdapterFactory adapterFactory) {
51         super(adapterFactory);
52     }
53
54     /**
55      * This returns the property descriptors for the adapted class.
56      * <!-- begin-user-doc -->
57      * <!-- end-user-doc -->
58      * @generated
59      */

60     public List JavaDoc getPropertyDescriptors(Object JavaDoc object) {
61         if (itemPropertyDescriptors == null) {
62             super.getPropertyDescriptors(object);
63
64         }
65         return itemPropertyDescriptors;
66     }
67
68     /**
69      * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
70      * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
71      * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
72      * <!-- begin-user-doc -->
73      * <!-- end-user-doc -->
74      * @generated
75      */

76     public Collection JavaDoc getChildrenFeatures(Object JavaDoc object) {
77         if (childrenFeatures == null) {
78             super.getChildrenFeatures(object);
79             childrenFeatures.add(OljPackage.eINSTANCE.getDocumentRoot_Mixed());
80         }
81         return childrenFeatures;
82     }
83
84     /**
85      * This returns DocumentRoot.gif.
86      * <!-- begin-user-doc -->
87      * <!-- end-user-doc -->
88      * @generated
89      */

90     public Object JavaDoc getImage(Object JavaDoc object) {
91         return getResourceLocator().getImage("full/obj16/DocumentRoot");
92     }
93
94     /**
95      * This returns the label text for the adapted class.
96      * <!-- begin-user-doc -->
97      * <!-- end-user-doc -->
98      * @generated
99      */

100     public String JavaDoc getText(Object JavaDoc object) {
101         return getString("_UI_DocumentRoot_type");
102     }
103
104     /**
105      * This handles model notifications by calling {@link #updateChildren} to update any cached
106      * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
107      * <!-- begin-user-doc -->
108      * <!-- end-user-doc -->
109      * @generated
110      */

111     public void notifyChanged(Notification notification) {
112         updateChildren(notification);
113
114         switch (notification.getFeatureID(DocumentRoot.class)) {
115             case OljPackage.DOCUMENT_ROOT__MIXED:
116                 fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
117                 return;
118         }
119         super.notifyChanged(notification);
120     }
121
122     /**
123      * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
124      * describing all of the children that can be created under this object.
125      * <!-- begin-user-doc -->
126      * <!-- end-user-doc -->
127      * @generated
128      */

129     protected void collectNewChildDescriptors(Collection JavaDoc newChildDescriptors, Object JavaDoc object) {
130         super.collectNewChildDescriptors(newChildDescriptors, object);
131
132         newChildDescriptors.add
133             (createChildParameter
134                 (OljPackage.eINSTANCE.getDocumentRoot_ConstantColumn(),
135                  OljFactory.eINSTANCE.createConstantColumnType()));
136
137         newChildDescriptors.add
138             (createChildParameter
139                 (OljPackage.eINSTANCE.getDocumentRoot_ConstantColumns(),
140                  OljFactory.eINSTANCE.createConstantColumnsType()));
141
142         newChildDescriptors.add
143             (createChildParameter
144                 (OljPackage.eINSTANCE.getDocumentRoot_CopyTable(),
145                  OljFactory.eINSTANCE.createCopyTableType()));
146
147         newChildDescriptors.add
148             (createChildParameter
149                 (OljPackage.eINSTANCE.getDocumentRoot_CounterColumn(),
150                  OljFactory.eINSTANCE.createCounterColumnType()));
151
152         newChildDescriptors.add
153             (createChildParameter
154                 (OljPackage.eINSTANCE.getDocumentRoot_CounterColumns(),
155                  OljFactory.eINSTANCE.createCounterColumnsType()));
156
157         newChildDescriptors.add
158             (createChildParameter
159                 (OljPackage.eINSTANCE.getDocumentRoot_DefinitionInclude(),
160                  OljFactory.eINSTANCE.createDefinitionIncludeType()));
161
162         newChildDescriptors.add
163             (createChildParameter
164                 (OljPackage.eINSTANCE.getDocumentRoot_Echo(),
165                  OljFactory.eINSTANCE.createEchoType()));
166
167         newChildDescriptors.add
168             (createChildParameter
169                 (OljPackage.eINSTANCE.getDocumentRoot_ImportDefinition(),
170                  OljFactory.eINSTANCE.createImportDefinitionType()));
171
172         newChildDescriptors.add
173             (createChildParameter
174                 (OljPackage.eINSTANCE.getDocumentRoot_Include(),
175                  OljFactory.eINSTANCE.createIncludeType()));
176
177         newChildDescriptors.add
178             (createChildParameter
179                 (OljPackage.eINSTANCE.getDocumentRoot_JavaScript(),
180                  OljFactory.eINSTANCE.createJavaScriptType()));
181
182         newChildDescriptors.add
183             (createChildParameter
184                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcDefaultParameters(),
185                  OljFactory.eINSTANCE.createJdbcDefaultParametersType()));
186
187         newChildDescriptors.add
188             (createChildParameter
189                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcParameters(),
190                  OljFactory.eINSTANCE.createJdbcParametersType()));
191
192         newChildDescriptors.add
193             (createChildParameter
194                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcSourceParameter(),
195                  OljFactory.eINSTANCE.createJdbcSourceParameterType()));
196
197         newChildDescriptors.add
198             (createChildParameter
199                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcSourceParameters(),
200                  OljFactory.eINSTANCE.createJdbcSourceParametersType()));
201
202         newChildDescriptors.add
203             (createChildParameter
204                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcSourceTargetParameters(),
205                  OljFactory.eINSTANCE.createJdbcSourceTargetParametersType()));
206
207         newChildDescriptors.add
208             (createChildParameter
209                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcTargetParameter(),
210                  OljFactory.eINSTANCE.createJdbcTargetParameterType()));
211
212         newChildDescriptors.add
213             (createChildParameter
214                 (OljPackage.eINSTANCE.getDocumentRoot_JdbcTargetParameters(),
215                  OljFactory.eINSTANCE.createJdbcTargetParametersType()));
216
217         newChildDescriptors.add
218             (createChildParameter
219                 (OljPackage.eINSTANCE.getDocumentRoot_LoaderJob(),
220                  OljFactory.eINSTANCE.createLoaderJobType()));
221
222         newChildDescriptors.add
223             (createChildParameter
224                 (OljPackage.eINSTANCE.getDocumentRoot_RelationColumn(),
225                  OljFactory.eINSTANCE.createRelationColumnType()));
226
227         newChildDescriptors.add
228             (createChildParameter
229                 (OljPackage.eINSTANCE.getDocumentRoot_RelationColumns(),
230                  OljFactory.eINSTANCE.createRelationColumnsType()));
231
232         newChildDescriptors.add
233             (createChildParameter
234                 (OljPackage.eINSTANCE.getDocumentRoot_RestartCounter(),
235                  OljFactory.eINSTANCE.createRestartCounterType()));
236
237         newChildDescriptors.add
238             (createChildParameter
239                 (OljPackage.eINSTANCE.getDocumentRoot_SortColumn(),
240                  OljFactory.eINSTANCE.createSortColumnType()));
241
242         newChildDescriptors.add
243             (createChildParameter
244                 (OljPackage.eINSTANCE.getDocumentRoot_SortColumns(),
245                  OljFactory.eINSTANCE.createSortColumnsType()));
246
247         newChildDescriptors.add
248             (createChildParameter
249                 (OljPackage.eINSTANCE.getDocumentRoot_SourceColumn(),
250                  OljFactory.eINSTANCE.createSourceColumnType()));
251
252         newChildDescriptors.add
253             (createChildParameter
254                 (OljPackage.eINSTANCE.getDocumentRoot_SourceColumns(),
255                  OljFactory.eINSTANCE.createSourceColumnsType()));
256
257         newChildDescriptors.add
258             (createChildParameter
259                 (OljPackage.eINSTANCE.getDocumentRoot_Sql(),
260                  OljFactory.eINSTANCE.createSqlType()));
261
262         newChildDescriptors.add
263             (createChildParameter
264                 (OljPackage.eINSTANCE.getDocumentRoot_SqlStmt(),
265                  OljFactory.eINSTANCE.createSqlStmtType()));
266
267         newChildDescriptors.add
268             (createChildParameter
269                 (OljPackage.eINSTANCE.getDocumentRoot_SubCounterColumn(),
270                  OljFactory.eINSTANCE.createSubCounterColumnType()));
271
272         newChildDescriptors.add
273             (createChildParameter
274                 (OljPackage.eINSTANCE.getDocumentRoot_SubCounterKeyColumn(),
275                  OljFactory.eINSTANCE.createSubCounterKeyColumnType()));
276
277         newChildDescriptors.add
278             (createChildParameter
279                 (OljPackage.eINSTANCE.getDocumentRoot_Table(),
280                  OljFactory.eINSTANCE.createTableType()));
281
282         newChildDescriptors.add
283             (createChildParameter
284                 (OljPackage.eINSTANCE.getDocumentRoot_Tables(),
285                  OljFactory.eINSTANCE.createTablesType()));
286
287         newChildDescriptors.add
288             (createChildParameter
289                 (OljPackage.eINSTANCE.getDocumentRoot_TargetColumn(),
290                  OljFactory.eINSTANCE.createTargetColumnType()));
291
292         newChildDescriptors.add
293             (createChildParameter
294                 (OljPackage.eINSTANCE.getDocumentRoot_TargetColumns(),
295                  OljFactory.eINSTANCE.createTargetColumnsType()));
296
297         newChildDescriptors.add
298             (createChildParameter
299                 (OljPackage.eINSTANCE.getDocumentRoot_TimeStampColumn(),
300                  OljFactory.eINSTANCE.createTimeStampColumnType()));
301
302         newChildDescriptors.add
303             (createChildParameter
304                 (OljPackage.eINSTANCE.getDocumentRoot_Transformation(),
305                  OljFactory.eINSTANCE.createTransformationType()));
306
307         newChildDescriptors.add
308             (createChildParameter
309                 (OljPackage.eINSTANCE.getDocumentRoot_Transformations(),
310                  OljFactory.eINSTANCE.createTransformationsType()));
311
312         newChildDescriptors.add
313             (createChildParameter
314                 (OljPackage.eINSTANCE.getDocumentRoot_UserIDColumn(),
315                  OljFactory.eINSTANCE.createUserIDColumnType()));
316
317         newChildDescriptors.add
318             (createChildParameter
319                 (OljPackage.eINSTANCE.getDocumentRoot_ValueColumn(),
320                  OljFactory.eINSTANCE.createValueColumnType()));
321
322         newChildDescriptors.add
323             (createChildParameter
324                 (OljPackage.eINSTANCE.getDocumentRoot_ValueColumns(),
325                  OljFactory.eINSTANCE.createValueColumnsType()));
326
327         newChildDescriptors.add
328             (createChildParameter
329                 (OljPackage.eINSTANCE.getDocumentRoot_Variable(),
330                  OljFactory.eINSTANCE.createVariableType()));
331
332         newChildDescriptors.add
333             (createChildParameter
334                 (OljPackage.eINSTANCE.getDocumentRoot_VariableColumn(),
335                  OljFactory.eINSTANCE.createVariableColumnType()));
336
337         newChildDescriptors.add
338             (createChildParameter
339                 (OljPackage.eINSTANCE.getDocumentRoot_VariableColumns(),
340                  OljFactory.eINSTANCE.createVariableColumnsType()));
341
342         newChildDescriptors.add
343             (createChildParameter
344                 (OljPackage.eINSTANCE.getDocumentRoot_Variables(),
345                  OljFactory.eINSTANCE.createVariablesType()));
346     }
347
348     /**
349      * Return the resource locator for this item provider's resources.
350      * <!-- begin-user-doc -->
351      * <!-- end-user-doc -->
352      * @generated
353      */

354     public ResourceLocator getResourceLocator() {
355         return OljEditPlugin.INSTANCE;
356     }
357
358 }
359
Popular Tags