1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package EssentialOCL.provider; |
8 | |
9 | import EssentialOCL.util.EssentialOCLAdapterFactory; |
10 | |
11 | import java.util.ArrayList; |
12 | import java.util.Collection; |
13 | |
14 | import org.eclipse.emf.common.notify.Adapter; |
15 | import org.eclipse.emf.common.notify.Notification; |
16 | import org.eclipse.emf.common.notify.Notifier; |
17 | |
18 | import org.eclipse.emf.edit.provider.ChangeNotifier; |
19 | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
20 | import org.eclipse.emf.edit.provider.ComposedAdapterFactory; |
21 | import org.eclipse.emf.edit.provider.IChangeNotifier; |
22 | import org.eclipse.emf.edit.provider.IDisposable; |
23 | import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
24 | import org.eclipse.emf.edit.provider.IItemLabelProvider; |
25 | import org.eclipse.emf.edit.provider.IItemPropertySource; |
26 | import org.eclipse.emf.edit.provider.INotifyChangedListener; |
27 | import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
28 | import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
29 | |
30 | /** |
31 | * This is the factory that is used to provide the interfaces needed to support Viewers. |
32 | * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. |
33 | * The adapters also support Eclipse property sheets. |
34 | * Note that most of the adapters are shared among multiple instances. |
35 | * <!-- begin-user-doc --> |
36 | * <!-- end-user-doc --> |
37 | * @generated |
38 | */ |
39 | public class EssentialOCLItemProviderAdapterFactory extends EssentialOCLAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { |
40 | /** |
41 | * This keeps track of the root adapter factory that delegates to this adapter factory. |
42 | * <!-- begin-user-doc --> |
43 | * <!-- end-user-doc --> |
44 | * @generated |
45 | */ |
46 | protected ComposedAdapterFactory parentAdapterFactory; |
47 | |
48 | /** |
49 | * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. |
50 | * <!-- begin-user-doc --> |
51 | * <!-- end-user-doc --> |
52 | * @generated |
53 | */ |
54 | protected IChangeNotifier changeNotifier = new ChangeNotifier(); |
55 | |
56 | /** |
57 | * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. |
58 | * <!-- begin-user-doc --> |
59 | * <!-- end-user-doc --> |
60 | * @generated |
61 | */ |
62 | protected Collection<Object> supportedTypes = new ArrayList<Object>(); |
63 | |
64 | /** |
65 | * This constructs an instance. |
66 | * <!-- begin-user-doc --> |
67 | * <!-- end-user-doc --> |
68 | * @generated |
69 | */ |
70 | public EssentialOCLItemProviderAdapterFactory() { |
71 | supportedTypes.add(IEditingDomainItemProvider.class); |
72 | supportedTypes.add(IStructuredItemContentProvider.class); |
73 | supportedTypes.add(ITreeItemContentProvider.class); |
74 | supportedTypes.add(IItemLabelProvider.class); |
75 | supportedTypes.add(IItemPropertySource.class); |
76 | } |
77 | |
78 | /** |
79 | * This keeps track of the one adapter used for all {@link EssentialOCL.AnyType} instances. |
80 | * <!-- begin-user-doc --> |
81 | * <!-- end-user-doc --> |
82 | * @generated |
83 | */ |
84 | protected AnyTypeItemProvider anyTypeItemProvider; |
85 | |
86 | /** |
87 | * This creates an adapter for a {@link EssentialOCL.AnyType}. |
88 | * <!-- begin-user-doc --> |
89 | * <!-- end-user-doc --> |
90 | * @generated |
91 | */ |
92 | @Override |
93 | public Adapter createAnyTypeAdapter() { |
94 | if (anyTypeItemProvider == null) { |
95 | anyTypeItemProvider = new AnyTypeItemProvider(this); |
96 | } |
97 | |
98 | return anyTypeItemProvider; |
99 | } |
100 | |
101 | /** |
102 | * This keeps track of the one adapter used for all {@link EssentialOCL.BagType} instances. |
103 | * <!-- begin-user-doc --> |
104 | * <!-- end-user-doc --> |
105 | * @generated |
106 | */ |
107 | protected BagTypeItemProvider bagTypeItemProvider; |
108 | |
109 | /** |
110 | * This creates an adapter for a {@link EssentialOCL.BagType}. |
111 | * <!-- begin-user-doc --> |
112 | * <!-- end-user-doc --> |
113 | * @generated |
114 | */ |
115 | @Override |
116 | public Adapter createBagTypeAdapter() { |
117 | if (bagTypeItemProvider == null) { |
118 | bagTypeItemProvider = new BagTypeItemProvider(this); |
119 | } |
120 | |
121 | return bagTypeItemProvider; |
122 | } |
123 | |
124 | /** |
125 | * This keeps track of the one adapter used for all {@link EssentialOCL.BooleanLiteralExp} instances. |
126 | * <!-- begin-user-doc --> |
127 | * <!-- end-user-doc --> |
128 | * @generated |
129 | */ |
130 | protected BooleanLiteralExpItemProvider booleanLiteralExpItemProvider; |
131 | |
132 | /** |
133 | * This creates an adapter for a {@link EssentialOCL.BooleanLiteralExp}. |
134 | * <!-- begin-user-doc --> |
135 | * <!-- end-user-doc --> |
136 | * @generated |
137 | */ |
138 | @Override |
139 | public Adapter createBooleanLiteralExpAdapter() { |
140 | if (booleanLiteralExpItemProvider == null) { |
141 | booleanLiteralExpItemProvider = new BooleanLiteralExpItemProvider(this); |
142 | } |
143 | |
144 | return booleanLiteralExpItemProvider; |
145 | } |
146 | |
147 | /** |
148 | * This keeps track of the one adapter used for all {@link EssentialOCL.CollectionItem} instances. |
149 | * <!-- begin-user-doc --> |
150 | * <!-- end-user-doc --> |
151 | * @generated |
152 | */ |
153 | protected CollectionItemItemProvider collectionItemItemProvider; |
154 | |
155 | /** |
156 | * This creates an adapter for a {@link EssentialOCL.CollectionItem}. |
157 | * <!-- begin-user-doc --> |
158 | * <!-- end-user-doc --> |
159 | * @generated |
160 | */ |
161 | @Override |
162 | public Adapter createCollectionItemAdapter() { |
163 | if (collectionItemItemProvider == null) { |
164 | collectionItemItemProvider = new CollectionItemItemProvider(this); |
165 | } |
166 | |
167 | return collectionItemItemProvider; |
168 | } |
169 | |
170 | /** |
171 | * This keeps track of the one adapter used for all {@link EssentialOCL.CollectionLiteralExp} instances. |
172 | * <!-- begin-user-doc --> |
173 | * <!-- end-user-doc --> |
174 | * @generated |
175 | */ |
176 | protected CollectionLiteralExpItemProvider collectionLiteralExpItemProvider; |
177 | |
178 | /** |
179 | * This creates an adapter for a {@link EssentialOCL.CollectionLiteralExp}. |
180 | * <!-- begin-user-doc --> |
181 | * <!-- end-user-doc --> |
182 | * @generated |
183 | */ |
184 | @Override |
185 | public Adapter createCollectionLiteralExpAdapter() { |
186 | if (collectionLiteralExpItemProvider == null) { |
187 | collectionLiteralExpItemProvider = new CollectionLiteralExpItemProvider(this); |
188 | } |
189 | |
190 | return collectionLiteralExpItemProvider; |
191 | } |
192 | |
193 | /** |
194 | * This keeps track of the one adapter used for all {@link EssentialOCL.CollectionRange} instances. |
195 | * <!-- begin-user-doc --> |
196 | * <!-- end-user-doc --> |
197 | * @generated |
198 | */ |
199 | protected CollectionRangeItemProvider collectionRangeItemProvider; |
200 | |
201 | /** |
202 | * This creates an adapter for a {@link EssentialOCL.CollectionRange}. |
203 | * <!-- begin-user-doc --> |
204 | * <!-- end-user-doc --> |
205 | * @generated |
206 | */ |
207 | @Override |
208 | public Adapter createCollectionRangeAdapter() { |
209 | if (collectionRangeItemProvider == null) { |
210 | collectionRangeItemProvider = new CollectionRangeItemProvider(this); |
211 | } |
212 | |
213 | return collectionRangeItemProvider; |
214 | } |
215 | |
216 | /** |
217 | * This keeps track of the one adapter used for all {@link EssentialOCL.CollectionType} instances. |
218 | * <!-- begin-user-doc --> |
219 | * <!-- end-user-doc --> |
220 | * @generated |
221 | */ |
222 | protected CollectionTypeItemProvider collectionTypeItemProvider; |
223 | |
224 | /** |
225 | * This creates an adapter for a {@link EssentialOCL.CollectionType}. |
226 | * <!-- begin-user-doc --> |
227 | * <!-- end-user-doc --> |
228 | * @generated |
229 | */ |
230 | @Override |
231 | public Adapter createCollectionTypeAdapter() { |
232 | if (collectionTypeItemProvider == null) { |
233 | collectionTypeItemProvider = new CollectionTypeItemProvider(this); |
234 | } |
235 | |
236 | return collectionTypeItemProvider; |
237 | } |
238 | |
239 | /** |
240 | * This keeps track of the one adapter used for all {@link EssentialOCL.EnumLiteralExp} instances. |
241 | * <!-- begin-user-doc --> |
242 | * <!-- end-user-doc --> |
243 | * @generated |
244 | */ |
245 | protected EnumLiteralExpItemProvider enumLiteralExpItemProvider; |
246 | |
247 | /** |
248 | * This creates an adapter for a {@link EssentialOCL.EnumLiteralExp}. |
249 | * <!-- begin-user-doc --> |
250 | * <!-- end-user-doc --> |
251 | * @generated |
252 | */ |
253 | @Override |
254 | public Adapter createEnumLiteralExpAdapter() { |
255 | if (enumLiteralExpItemProvider == null) { |
256 | enumLiteralExpItemProvider = new EnumLiteralExpItemProvider(this); |
257 | } |
258 | |
259 | return enumLiteralExpItemProvider; |
260 | } |
261 | |
262 | /** |
263 | * This keeps track of the one adapter used for all {@link EssentialOCL.ExpressionInOcl} instances. |
264 | * <!-- begin-user-doc --> |
265 | * <!-- end-user-doc --> |
266 | * @generated |
267 | */ |
268 | protected ExpressionInOclItemProvider expressionInOclItemProvider; |
269 | |
270 | /** |
271 | * This creates an adapter for a {@link EssentialOCL.ExpressionInOcl}. |
272 | * <!-- begin-user-doc --> |
273 | * <!-- end-user-doc --> |
274 | * @generated |
275 | */ |
276 | @Override |
277 | public Adapter createExpressionInOclAdapter() { |
278 | if (expressionInOclItemProvider == null) { |
279 | expressionInOclItemProvider = new ExpressionInOclItemProvider(this); |
280 | } |
281 | |
282 | return expressionInOclItemProvider; |
283 | } |
284 | |
285 | /** |
286 | * This keeps track of the one adapter used for all {@link EssentialOCL.IfExp} instances. |
287 | * <!-- begin-user-doc --> |
288 | * <!-- end-user-doc --> |
289 | * @generated |
290 | */ |
291 | protected IfExpItemProvider ifExpItemProvider; |
292 | |
293 | /** |
294 | * This creates an adapter for a {@link EssentialOCL.IfExp}. |
295 | * <!-- begin-user-doc --> |
296 | * <!-- end-user-doc --> |
297 | * @generated |
298 | */ |
299 | @Override |
300 | public Adapter createIfExpAdapter() { |
301 | if (ifExpItemProvider == null) { |
302 | ifExpItemProvider = new IfExpItemProvider(this); |
303 | } |
304 | |
305 | return ifExpItemProvider; |
306 | } |
307 | |
308 | /** |
309 | * This keeps track of the one adapter used for all {@link EssentialOCL.IntegerLiteralExp} instances. |
310 | * <!-- begin-user-doc --> |
311 | * <!-- end-user-doc --> |
312 | * @generated |
313 | */ |
314 | protected IntegerLiteralExpItemProvider integerLiteralExpItemProvider; |
315 | |
316 | /** |
317 | * This creates an adapter for a {@link EssentialOCL.IntegerLiteralExp}. |
318 | * <!-- begin-user-doc --> |
319 | * <!-- end-user-doc --> |
320 | * @generated |
321 | */ |
322 | @Override |
323 | public Adapter createIntegerLiteralExpAdapter() { |
324 | if (integerLiteralExpItemProvider == null) { |
325 | integerLiteralExpItemProvider = new IntegerLiteralExpItemProvider(this); |
326 | } |
327 | |
328 | return integerLiteralExpItemProvider; |
329 | } |
330 | |
331 | /** |
332 | * This keeps track of the one adapter used for all {@link EssentialOCL.InvalidLiteralExp} instances. |
333 | * <!-- begin-user-doc --> |
334 | * <!-- end-user-doc --> |
335 | * @generated |
336 | */ |
337 | protected InvalidLiteralExpItemProvider invalidLiteralExpItemProvider; |
338 | |
339 | /** |
340 | * This creates an adapter for a {@link EssentialOCL.InvalidLiteralExp}. |
341 | * <!-- begin-user-doc --> |
342 | * <!-- end-user-doc --> |
343 | * @generated |
344 | */ |
345 | @Override |
346 | public Adapter createInvalidLiteralExpAdapter() { |
347 | if (invalidLiteralExpItemProvider == null) { |
348 | invalidLiteralExpItemProvider = new InvalidLiteralExpItemProvider(this); |
349 | } |
350 | |
351 | return invalidLiteralExpItemProvider; |
352 | } |
353 | |
354 | /** |
355 | * This keeps track of the one adapter used for all {@link EssentialOCL.InvalidType} instances. |
356 | * <!-- begin-user-doc --> |
357 | * <!-- end-user-doc --> |
358 | * @generated |
359 | */ |
360 | protected InvalidTypeItemProvider invalidTypeItemProvider; |
361 | |
362 | /** |
363 | * This creates an adapter for a {@link EssentialOCL.InvalidType}. |
364 | * <!-- begin-user-doc --> |
365 | * <!-- end-user-doc --> |
366 | * @generated |
367 | */ |
368 | @Override |
369 | public Adapter createInvalidTypeAdapter() { |
370 | if (invalidTypeItemProvider == null) { |
371 | invalidTypeItemProvider = new InvalidTypeItemProvider(this); |
372 | } |
373 | |
374 | return invalidTypeItemProvider; |
375 | } |
376 | |
377 | /** |
378 | * This keeps track of the one adapter used for all {@link EssentialOCL.IterateExp} instances. |
379 | * <!-- begin-user-doc --> |
380 | * <!-- end-user-doc --> |
381 | * @generated |
382 | */ |
383 | protected IterateExpItemProvider iterateExpItemProvider; |
384 | |
385 | /** |
386 | * This creates an adapter for a {@link EssentialOCL.IterateExp}. |
387 | * <!-- begin-user-doc --> |
388 | * <!-- end-user-doc --> |
389 | * @generated |
390 | */ |
391 | @Override |
392 | public Adapter createIterateExpAdapter() { |
393 | if (iterateExpItemProvider == null) { |
394 | iterateExpItemProvider = new IterateExpItemProvider(this); |
395 | } |
396 | |
397 | return iterateExpItemProvider; |
398 | } |
399 | |
400 | /** |
401 | * This keeps track of the one adapter used for all {@link EssentialOCL.IteratorExp} instances. |
402 | * <!-- begin-user-doc --> |
403 | * <!-- end-user-doc --> |
404 | * @generated |
405 | */ |
406 | protected IteratorExpItemProvider iteratorExpItemProvider; |
407 | |
408 | /** |
409 | * This creates an adapter for a {@link EssentialOCL.IteratorExp}. |
410 | * <!-- begin-user-doc --> |
411 | * <!-- end-user-doc --> |
412 | * @generated |
413 | */ |
414 | @Override |
415 | public Adapter createIteratorExpAdapter() { |
416 | if (iteratorExpItemProvider == null) { |
417 | iteratorExpItemProvider = new IteratorExpItemProvider(this); |
418 | } |
419 | |
420 | return iteratorExpItemProvider; |
421 | } |
422 | |
423 | /** |
424 | * This keeps track of the one adapter used for all {@link EssentialOCL.LetExp} instances. |
425 | * <!-- begin-user-doc --> |
426 | * <!-- end-user-doc --> |
427 | * @generated |
428 | */ |
429 | protected LetExpItemProvider letExpItemProvider; |
430 | |
431 | /** |
432 | * This creates an adapter for a {@link EssentialOCL.LetExp}. |
433 | * <!-- begin-user-doc --> |
434 | * <!-- end-user-doc --> |
435 | * @generated |
436 | */ |
437 | @Override |
438 | public Adapter createLetExpAdapter() { |
439 | if (letExpItemProvider == null) { |
440 | letExpItemProvider = new LetExpItemProvider(this); |
441 | } |
442 | |
443 | return letExpItemProvider; |
444 | } |
445 | |
446 | /** |
447 | * This keeps track of the one adapter used for all {@link EssentialOCL.NavigationCallExp} instances. |
448 | * <!-- begin-user-doc --> |
449 | * <!-- end-user-doc --> |
450 | * @generated |
451 | */ |
452 | protected NavigationCallExpItemProvider navigationCallExpItemProvider; |
453 | |
454 | /** |
455 | * This creates an adapter for a {@link EssentialOCL.NavigationCallExp}. |
456 | * <!-- begin-user-doc --> |
457 | * <!-- end-user-doc --> |
458 | * @generated |
459 | */ |
460 | @Override |
461 | public Adapter createNavigationCallExpAdapter() { |
462 | if (navigationCallExpItemProvider == null) { |
463 | navigationCallExpItemProvider = new NavigationCallExpItemProvider(this); |
464 | } |
465 | |
466 | return navigationCallExpItemProvider; |
467 | } |
468 | |
469 | /** |
470 | * This keeps track of the one adapter used for all {@link EssentialOCL.NullLiteralExp} instances. |
471 | * <!-- begin-user-doc --> |
472 | * <!-- end-user-doc --> |
473 | * @generated |
474 | */ |
475 | protected NullLiteralExpItemProvider nullLiteralExpItemProvider; |
476 | |
477 | /** |
478 | * This creates an adapter for a {@link EssentialOCL.NullLiteralExp}. |
479 | * <!-- begin-user-doc --> |
480 | * <!-- end-user-doc --> |
481 | * @generated |
482 | */ |
483 | @Override |
484 | public Adapter createNullLiteralExpAdapter() { |
485 | if (nullLiteralExpItemProvider == null) { |
486 | nullLiteralExpItemProvider = new NullLiteralExpItemProvider(this); |
487 | } |
488 | |
489 | return nullLiteralExpItemProvider; |
490 | } |
491 | |
492 | /** |
493 | * This keeps track of the one adapter used for all {@link EssentialOCL.OperationCallExp} instances. |
494 | * <!-- begin-user-doc --> |
495 | * <!-- end-user-doc --> |
496 | * @generated |
497 | */ |
498 | protected OperationCallExpItemProvider operationCallExpItemProvider; |
499 | |
500 | /** |
501 | * This creates an adapter for a {@link EssentialOCL.OperationCallExp}. |
502 | * <!-- begin-user-doc --> |
503 | * <!-- end-user-doc --> |
504 | * @generated |
505 | */ |
506 | @Override |
507 | public Adapter createOperationCallExpAdapter() { |
508 | if (operationCallExpItemProvider == null) { |
509 | operationCallExpItemProvider = new OperationCallExpItemProvider(this); |
510 | } |
511 | |
512 | return operationCallExpItemProvider; |
513 | } |
514 | |
515 | /** |
516 | * This keeps track of the one adapter used for all {@link EssentialOCL.OrderedSetType} instances. |
517 | * <!-- begin-user-doc --> |
518 | * <!-- end-user-doc --> |
519 | * @generated |
520 | */ |
521 | protected OrderedSetTypeItemProvider orderedSetTypeItemProvider; |
522 | |
523 | /** |
524 | * This creates an adapter for a {@link EssentialOCL.OrderedSetType}. |
525 | * <!-- begin-user-doc --> |
526 | * <!-- end-user-doc --> |
527 | * @generated |
528 | */ |
529 | @Override |
530 | public Adapter createOrderedSetTypeAdapter() { |
531 | if (orderedSetTypeItemProvider == null) { |
532 | orderedSetTypeItemProvider = new OrderedSetTypeItemProvider(this); |
533 | } |
534 | |
535 | return orderedSetTypeItemProvider; |
536 | } |
537 | |
538 | /** |
539 | * This keeps track of the one adapter used for all {@link EssentialOCL.PropertyCallExp} instances. |
540 | * <!-- begin-user-doc --> |
541 | * <!-- end-user-doc --> |
542 | * @generated |
543 | */ |
544 | protected PropertyCallExpItemProvider propertyCallExpItemProvider; |
545 | |
546 | /** |
547 | * This creates an adapter for a {@link EssentialOCL.PropertyCallExp}. |
548 | * <!-- begin-user-doc --> |
549 | * <!-- end-user-doc --> |
550 | * @generated |
551 | */ |
552 | @Override |
553 | public Adapter createPropertyCallExpAdapter() { |
554 | if (propertyCallExpItemProvider == null) { |
555 | propertyCallExpItemProvider = new PropertyCallExpItemProvider(this); |
556 | } |
557 | |
558 | return propertyCallExpItemProvider; |
559 | } |
560 | |
561 | /** |
562 | * This keeps track of the one adapter used for all {@link EssentialOCL.RealLiteralExp} instances. |
563 | * <!-- begin-user-doc --> |
564 | * <!-- end-user-doc --> |
565 | * @generated |
566 | */ |
567 | protected RealLiteralExpItemProvider realLiteralExpItemProvider; |
568 | |
569 | /** |
570 | * This creates an adapter for a {@link EssentialOCL.RealLiteralExp}. |
571 | * <!-- begin-user-doc --> |
572 | * <!-- end-user-doc --> |
573 | * @generated |
574 | */ |
575 | @Override |
576 | public Adapter createRealLiteralExpAdapter() { |
577 | if (realLiteralExpItemProvider == null) { |
578 | realLiteralExpItemProvider = new RealLiteralExpItemProvider(this); |
579 | } |
580 | |
581 | return realLiteralExpItemProvider; |
582 | } |
583 | |
584 | /** |
585 | * This keeps track of the one adapter used for all {@link EssentialOCL.SequenceType} instances. |
586 | * <!-- begin-user-doc --> |
587 | * <!-- end-user-doc --> |
588 | * @generated |
589 | */ |
590 | protected SequenceTypeItemProvider sequenceTypeItemProvider; |
591 | |
592 | /** |
593 | * This creates an adapter for a {@link EssentialOCL.SequenceType}. |
594 | * <!-- begin-user-doc --> |
595 | * <!-- end-user-doc --> |
596 | * @generated |
597 | */ |
598 | @Override |
599 | public Adapter createSequenceTypeAdapter() { |
600 | if (sequenceTypeItemProvider == null) { |
601 | sequenceTypeItemProvider = new SequenceTypeItemProvider(this); |
602 | } |
603 | |
604 | return sequenceTypeItemProvider; |
605 | } |
606 | |
607 | /** |
608 | * This keeps track of the one adapter used for all {@link EssentialOCL.SetType} instances. |
609 | * <!-- begin-user-doc --> |
610 | * <!-- end-user-doc --> |
611 | * @generated |
612 | */ |
613 | protected SetTypeItemProvider setTypeItemProvider; |
614 | |
615 | /** |
616 | * This creates an adapter for a {@link EssentialOCL.SetType}. |
617 | * <!-- begin-user-doc --> |
618 | * <!-- end-user-doc --> |
619 | * @generated |
620 | */ |
621 | @Override |
622 | public Adapter createSetTypeAdapter() { |
623 | if (setTypeItemProvider == null) { |
624 | setTypeItemProvider = new SetTypeItemProvider(this); |
625 | } |
626 | |
627 | return setTypeItemProvider; |
628 | } |
629 | |
630 | /** |
631 | * This keeps track of the one adapter used for all {@link EssentialOCL.StringLiteralExp} instances. |
632 | * <!-- begin-user-doc --> |
633 | * <!-- end-user-doc --> |
634 | * @generated |
635 | */ |
636 | protected StringLiteralExpItemProvider stringLiteralExpItemProvider; |
637 | |
638 | /** |
639 | * This creates an adapter for a {@link EssentialOCL.StringLiteralExp}. |
640 | * <!-- begin-user-doc --> |
641 | * <!-- end-user-doc --> |
642 | * @generated |
643 | */ |
644 | @Override |
645 | public Adapter createStringLiteralExpAdapter() { |
646 | if (stringLiteralExpItemProvider == null) { |
647 | stringLiteralExpItemProvider = new StringLiteralExpItemProvider(this); |
648 | } |
649 | |
650 | return stringLiteralExpItemProvider; |
651 | } |
652 | |
653 | /** |
654 | * This keeps track of the one adapter used for all {@link EssentialOCL.TupleLiteralExp} instances. |
655 | * <!-- begin-user-doc --> |
656 | * <!-- end-user-doc --> |
657 | * @generated |
658 | */ |
659 | protected TupleLiteralExpItemProvider tupleLiteralExpItemProvider; |
660 | |
661 | /** |
662 | * This creates an adapter for a {@link EssentialOCL.TupleLiteralExp}. |
663 | * <!-- begin-user-doc --> |
664 | * <!-- end-user-doc --> |
665 | * @generated |
666 | */ |
667 | @Override |
668 | public Adapter createTupleLiteralExpAdapter() { |
669 | if (tupleLiteralExpItemProvider == null) { |
670 | tupleLiteralExpItemProvider = new TupleLiteralExpItemProvider(this); |
671 | } |
672 | |
673 | return tupleLiteralExpItemProvider; |
674 | } |
675 | |
676 | /** |
677 | * This keeps track of the one adapter used for all {@link EssentialOCL.TupleLiteralPart} instances. |
678 | * <!-- begin-user-doc --> |
679 | * <!-- end-user-doc --> |
680 | * @generated |
681 | */ |
682 | protected TupleLiteralPartItemProvider tupleLiteralPartItemProvider; |
683 | |
684 | /** |
685 | * This creates an adapter for a {@link EssentialOCL.TupleLiteralPart}. |
686 | * <!-- begin-user-doc --> |
687 | * <!-- end-user-doc --> |
688 | * @generated |
689 | */ |
690 | @Override |
691 | public Adapter createTupleLiteralPartAdapter() { |
692 | if (tupleLiteralPartItemProvider == null) { |
693 | tupleLiteralPartItemProvider = new TupleLiteralPartItemProvider(this); |
694 | } |
695 | |
696 | return tupleLiteralPartItemProvider; |
697 | } |
698 | |
699 | /** |
700 | * This keeps track of the one adapter used for all {@link EssentialOCL.TupleType} instances. |
701 | * <!-- begin-user-doc --> |
702 | * <!-- end-user-doc --> |
703 | * @generated |
704 | */ |
705 | protected TupleTypeItemProvider tupleTypeItemProvider; |
706 | |
707 | /** |
708 | * This creates an adapter for a {@link EssentialOCL.TupleType}. |
709 | * <!-- begin-user-doc --> |
710 | * <!-- end-user-doc --> |
711 | * @generated |
712 | */ |
713 | @Override |
714 | public Adapter createTupleTypeAdapter() { |
715 | if (tupleTypeItemProvider == null) { |
716 | tupleTypeItemProvider = new TupleTypeItemProvider(this); |
717 | } |
718 | |
719 | return tupleTypeItemProvider; |
720 | } |
721 | |
722 | /** |
723 | * This keeps track of the one adapter used for all {@link EssentialOCL.TypeExp} instances. |
724 | * <!-- begin-user-doc --> |
725 | * <!-- end-user-doc --> |
726 | * @generated |
727 | */ |
728 | protected TypeExpItemProvider typeExpItemProvider; |
729 | |
730 | /** |
731 | * This creates an adapter for a {@link EssentialOCL.TypeExp}. |
732 | * <!-- begin-user-doc --> |
733 | * <!-- end-user-doc --> |
734 | * @generated |
735 | */ |
736 | @Override |
737 | public Adapter createTypeExpAdapter() { |
738 | if (typeExpItemProvider == null) { |
739 | typeExpItemProvider = new TypeExpItemProvider(this); |
740 | } |
741 | |
742 | return typeExpItemProvider; |
743 | } |
744 | |
745 | /** |
746 | * This keeps track of the one adapter used for all {@link EssentialOCL.TypeType} instances. |
747 | * <!-- begin-user-doc --> |
748 | * <!-- end-user-doc --> |
749 | * @generated |
750 | */ |
751 | protected TypeTypeItemProvider typeTypeItemProvider; |
752 | |
753 | /** |
754 | * This creates an adapter for a {@link EssentialOCL.TypeType}. |
755 | * <!-- begin-user-doc --> |
756 | * <!-- end-user-doc --> |
757 | * @generated |
758 | */ |
759 | @Override |
760 | public Adapter createTypeTypeAdapter() { |
761 | if (typeTypeItemProvider == null) { |
762 | typeTypeItemProvider = new TypeTypeItemProvider(this); |
763 | } |
764 | |
765 | return typeTypeItemProvider; |
766 | } |
767 | |
768 | /** |
769 | * This keeps track of the one adapter used for all {@link EssentialOCL.UnlimitedNaturalExp} instances. |
770 | * <!-- begin-user-doc --> |
771 | * <!-- end-user-doc --> |
772 | * @generated |
773 | */ |
774 | protected UnlimitedNaturalExpItemProvider unlimitedNaturalExpItemProvider; |
775 | |
776 | /** |
777 | * This creates an adapter for a {@link EssentialOCL.UnlimitedNaturalExp}. |
778 | * <!-- begin-user-doc --> |
779 | * <!-- end-user-doc --> |
780 | * @generated |
781 | */ |
782 | @Override |
783 | public Adapter createUnlimitedNaturalExpAdapter() { |
784 | if (unlimitedNaturalExpItemProvider == null) { |
785 | unlimitedNaturalExpItemProvider = new UnlimitedNaturalExpItemProvider(this); |
786 | } |
787 | |
788 | return unlimitedNaturalExpItemProvider; |
789 | } |
790 | |
791 | /** |
792 | * This keeps track of the one adapter used for all {@link EssentialOCL.Variable} instances. |
793 | * <!-- begin-user-doc --> |
794 | * <!-- end-user-doc --> |
795 | * @generated |
796 | */ |
797 | protected VariableItemProvider variableItemProvider; |
798 | |
799 | /** |
800 | * This creates an adapter for a {@link EssentialOCL.Variable}. |
801 | * <!-- begin-user-doc --> |
802 | * <!-- end-user-doc --> |
803 | * @generated |
804 | */ |
805 | @Override |
806 | public Adapter createVariableAdapter() { |
807 | if (variableItemProvider == null) { |
808 | variableItemProvider = new VariableItemProvider(this); |
809 | } |
810 | |
811 | return variableItemProvider; |
812 | } |
813 | |
814 | /** |
815 | * This keeps track of the one adapter used for all {@link EssentialOCL.VariableExp} instances. |
816 | * <!-- begin-user-doc --> |
817 | * <!-- end-user-doc --> |
818 | * @generated |
819 | */ |
820 | protected VariableExpItemProvider variableExpItemProvider; |
821 | |
822 | /** |
823 | * This creates an adapter for a {@link EssentialOCL.VariableExp}. |
824 | * <!-- begin-user-doc --> |
825 | * <!-- end-user-doc --> |
826 | * @generated |
827 | */ |
828 | @Override |
829 | public Adapter createVariableExpAdapter() { |
830 | if (variableExpItemProvider == null) { |
831 | variableExpItemProvider = new VariableExpItemProvider(this); |
832 | } |
833 | |
834 | return variableExpItemProvider; |
835 | } |
836 | |
837 | /** |
838 | * This keeps track of the one adapter used for all {@link EssentialOCL.VoidType} instances. |
839 | * <!-- begin-user-doc --> |
840 | * <!-- end-user-doc --> |
841 | * @generated |
842 | */ |
843 | protected VoidTypeItemProvider voidTypeItemProvider; |
844 | |
845 | /** |
846 | * This creates an adapter for a {@link EssentialOCL.VoidType}. |
847 | * <!-- begin-user-doc --> |
848 | * <!-- end-user-doc --> |
849 | * @generated |
850 | */ |
851 | @Override |
852 | public Adapter createVoidTypeAdapter() { |
853 | if (voidTypeItemProvider == null) { |
854 | voidTypeItemProvider = new VoidTypeItemProvider(this); |
855 | } |
856 | |
857 | return voidTypeItemProvider; |
858 | } |
859 | |
860 | /** |
861 | * This returns the root adapter factory that contains this factory. |
862 | * <!-- begin-user-doc --> |
863 | * <!-- end-user-doc --> |
864 | * @generated |
865 | */ |
866 | public ComposeableAdapterFactory getRootAdapterFactory() { |
867 | return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); |
868 | } |
869 | |
870 | /** |
871 | * This sets the composed adapter factory that contains this factory. |
872 | * <!-- begin-user-doc --> |
873 | * <!-- end-user-doc --> |
874 | * @generated |
875 | */ |
876 | public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { |
877 | this.parentAdapterFactory = parentAdapterFactory; |
878 | } |
879 | |
880 | /** |
881 | * <!-- begin-user-doc --> |
882 | * <!-- end-user-doc --> |
883 | * @generated |
884 | */ |
885 | @Override |
886 | public boolean isFactoryForType(Object type) { |
887 | return supportedTypes.contains(type) || super.isFactoryForType(type); |
888 | } |
889 | |
890 | /** |
891 | * This implementation substitutes the factory itself as the key for the adapter. |
892 | * <!-- begin-user-doc --> |
893 | * <!-- end-user-doc --> |
894 | * @generated |
895 | */ |
896 | @Override |
897 | public Adapter adapt(Notifier notifier, Object type) { |
898 | return super.adapt(notifier, this); |
899 | } |
900 | |
901 | /** |
902 | * <!-- begin-user-doc --> |
903 | * <!-- end-user-doc --> |
904 | * @generated |
905 | */ |
906 | @Override |
907 | public Object adapt(Object object, Object type) { |
908 | if (isFactoryForType(type)) { |
909 | Object adapter = super.adapt(object, type); |
910 | if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) { |
911 | return adapter; |
912 | } |
913 | } |
914 | |
915 | return null; |
916 | } |
917 | |
918 | /** |
919 | * This adds a listener. |
920 | * <!-- begin-user-doc --> |
921 | * <!-- end-user-doc --> |
922 | * @generated |
923 | */ |
924 | public void addListener(INotifyChangedListener notifyChangedListener) { |
925 | changeNotifier.addListener(notifyChangedListener); |
926 | } |
927 | |
928 | /** |
929 | * This removes a listener. |
930 | * <!-- begin-user-doc --> |
931 | * <!-- end-user-doc --> |
932 | * @generated |
933 | */ |
934 | public void removeListener(INotifyChangedListener notifyChangedListener) { |
935 | changeNotifier.removeListener(notifyChangedListener); |
936 | } |
937 | |
938 | /** |
939 | * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. |
940 | * <!-- begin-user-doc --> |
941 | * <!-- end-user-doc --> |
942 | * @generated |
943 | */ |
944 | public void fireNotifyChanged(Notification notification) { |
945 | changeNotifier.fireNotifyChanged(notification); |
946 | |
947 | if (parentAdapterFactory != null) { |
948 | parentAdapterFactory.fireNotifyChanged(notification); |
949 | } |
950 | } |
951 | |
952 | /** |
953 | * This disposes all of the item providers created by this factory. |
954 | * <!-- begin-user-doc --> |
955 | * <!-- end-user-doc --> |
956 | * @generated |
957 | */ |
958 | public void dispose() { |
959 | if (anyTypeItemProvider != null) anyTypeItemProvider.dispose(); |
960 | if (bagTypeItemProvider != null) bagTypeItemProvider.dispose(); |
961 | if (booleanLiteralExpItemProvider != null) booleanLiteralExpItemProvider.dispose(); |
962 | if (collectionItemItemProvider != null) collectionItemItemProvider.dispose(); |
963 | if (collectionLiteralExpItemProvider != null) collectionLiteralExpItemProvider.dispose(); |
964 | if (collectionRangeItemProvider != null) collectionRangeItemProvider.dispose(); |
965 | if (collectionTypeItemProvider != null) collectionTypeItemProvider.dispose(); |
966 | if (enumLiteralExpItemProvider != null) enumLiteralExpItemProvider.dispose(); |
967 | if (expressionInOclItemProvider != null) expressionInOclItemProvider.dispose(); |
968 | if (ifExpItemProvider != null) ifExpItemProvider.dispose(); |
969 | if (integerLiteralExpItemProvider != null) integerLiteralExpItemProvider.dispose(); |
970 | if (invalidLiteralExpItemProvider != null) invalidLiteralExpItemProvider.dispose(); |
971 | if (invalidTypeItemProvider != null) invalidTypeItemProvider.dispose(); |
972 | if (iterateExpItemProvider != null) iterateExpItemProvider.dispose(); |
973 | if (iteratorExpItemProvider != null) iteratorExpItemProvider.dispose(); |
974 | if (letExpItemProvider != null) letExpItemProvider.dispose(); |
975 | if (navigationCallExpItemProvider != null) navigationCallExpItemProvider.dispose(); |
976 | if (nullLiteralExpItemProvider != null) nullLiteralExpItemProvider.dispose(); |
977 | if (operationCallExpItemProvider != null) operationCallExpItemProvider.dispose(); |
978 | if (orderedSetTypeItemProvider != null) orderedSetTypeItemProvider.dispose(); |
979 | if (propertyCallExpItemProvider != null) propertyCallExpItemProvider.dispose(); |
980 | if (realLiteralExpItemProvider != null) realLiteralExpItemProvider.dispose(); |
981 | if (sequenceTypeItemProvider != null) sequenceTypeItemProvider.dispose(); |
982 | if (setTypeItemProvider != null) setTypeItemProvider.dispose(); |
983 | if (stringLiteralExpItemProvider != null) stringLiteralExpItemProvider.dispose(); |
984 | if (tupleLiteralExpItemProvider != null) tupleLiteralExpItemProvider.dispose(); |
985 | if (tupleLiteralPartItemProvider != null) tupleLiteralPartItemProvider.dispose(); |
986 | if (tupleTypeItemProvider != null) tupleTypeItemProvider.dispose(); |
987 | if (typeExpItemProvider != null) typeExpItemProvider.dispose(); |
988 | if (typeTypeItemProvider != null) typeTypeItemProvider.dispose(); |
989 | if (unlimitedNaturalExpItemProvider != null) unlimitedNaturalExpItemProvider.dispose(); |
990 | if (variableItemProvider != null) variableItemProvider.dispose(); |
991 | if (variableExpItemProvider != null) variableExpItemProvider.dispose(); |
992 | if (voidTypeItemProvider != null) voidTypeItemProvider.dispose(); |
993 | } |
994 | |
995 | } |