1 | public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵ | | 1 | public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵
|
2 | {↵ | | 2 | {↵
|
3 | this.parentAdapterFactory = parentAdapterFactory;↵ | | 3 | this.parentAdapterFactory = parentAdapterFactory;↵
|
4 | }↵ | | 4 | }↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * <!-- begin-user-doc -->↵ | | 6 | * <!-- begin-user-doc -->↵
|
7 | * <!-- end-user-doc -->↵ | | 7 | * <!-- end-user-doc -->↵
|
8 | * @generated↵ | | 8 | * @generated↵
|
9 | */↵ | | 9 | */↵
|
10 | @Override↵ | | 10 | @Override↵
|
11 | public boolean isFactoryForType(Object type)↵ | | 11 | public boolean isFactoryForType(Object type)↵
|
12 | {↵ | | 12 | {↵
|
13 | return supportedTypes.contains(type) || super.isFactoryForType(type);↵ | | 13 | return supportedTypes.contains(type) || super.isFactoryForType(type);↵
|
14 | }↵ | | 14 | }↵
|
|
15 | /**↵ | | 15 | /**↵
|
16 | * This implementation substitutes the factory itself as the key for the adapter.↵ | | 16 | * This implementation substitutes the factory itself as the key for the adapter.↵
|
17 | * <!-- begin-user-doc -->↵ | | 17 | * <!-- begin-user-doc -->↵
|
18 | * <!-- end-user-doc -->↵ | | 18 | * <!-- end-user-doc -->↵
|
19 | * @generated↵ | | 19 | * @generated↵
|
20 | */↵ | | 20 | */↵
|
21 | @Override↵ | | 21 | @Override↵
|
22 | public Adapter adapt(Notifier notifier, Object type)↵ | | 22 | public Adapter adapt(Notifier notifier, Object type)↵
|
23 | {↵ | | 23 | {↵
|
24 | return super.adapt(notifier, this);↵ | | 24 | return super.adapt(notifier, this);↵
|
25 | }↵ | | 25 | }↵
|
|
26 | /**↵ | | 26 | /**↵
|
27 | * <!-- begin-user-doc -->↵ | | 27 | * <!-- begin-user-doc -->↵
|
28 | * <!-- end-user-doc -->↵ | | 28 | * <!-- end-user-doc -->↵
|
29 | * @generated↵ | | 29 | * @generated↵
|
30 | */↵ | | 30 | */↵
|
31 | @Override↵ | | 31 | @Override↵
|
32 | public Object adapt(Object object, Object type)↵ | | 32 | public Object adapt(Object object, Object type)↵
|
33 | {↵ | | 33 | {↵
|
34 | if (isFactoryForType(type))↵ | | 34 | if (isFactoryForType(type))↵
|
35 | {↵ | | 35 | {↵
|
36 | Object adapter = super.adapt(object, type);↵ | | 36 | Object adapter = super.adapt(object, type);↵
|
37 | if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵ | | 37 | if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵
|
38 | {↵ | | 38 | {↵
|
39 | return adapter;↵ | | 39 | return adapter;↵
|
40 | }↵ | | 40 | }↵
|
41 | }↵ | | 41 | }↵
|
|
42 | return null;↵ | | 42 | return null;↵
|
43 | }↵ | | 43 | }↵
|
|
44 | /**↵ | | 44 | /**↵
|
45 | * This adds a listener.↵ | | 45 | * This adds a listener.↵
|
46 | * <!-- begin-user-doc -->↵ | | 46 | * <!-- begin-user-doc -->↵
|
47 | * <!-- end-user-doc -->↵ | | 47 | * <!-- end-user-doc -->↵
|
48 | * @generated↵ | | 48 | * @generated↵
|
49 | */↵ | | 49 | */↵
|
50 | public void addListener(INotifyChangedListener notifyChangedListener)↵ | | 50 | public void addListener(INotifyChangedListener notifyChangedListener)↵
|
51 | {↵ | | 51 | {↵
|
52 | changeNotifier.addListener(notifyChangedListener);↵ | | 52 | changeNotifier.addListener(notifyChangedListener);↵
|
53 | }↵ | | 53 | }↵
|
|
54 | /**↵ | | 54 | /**↵
|
55 | * This removes a listener.↵ | | 55 | * This removes a listener.↵
|
56 | * <!-- begin-user-doc -->↵ | | 56 | * <!-- begin-user-doc -->↵
|
57 | * <!-- end-user-doc -->↵ | | 57 | * <!-- end-user-doc -->↵
|
58 | * @generated↵ | | 58 | * @generated↵
|
59 | */↵ | | 59 | */↵
|
60 | public void removeListener(INotifyChangedListener notifyChangedListener)↵ | | 60 | public void removeListener(INotifyChangedListener notifyChangedListener)↵
|
61 | {↵ | | 61 | {↵
|
62 | changeNotifier.removeListener(notifyChangedListener);↵ | | 62 | changeNotifier.removeListener(notifyChangedListener);↵
|
63 | }↵ | | 63 | }↵
|
|
64 | /**↵ | | 64 | /**↵
|
65 | * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.↵ | | 65 | * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.↵
|
66 | * <!-- begin-user-doc -->↵ | | 66 | * <!-- begin-user-doc -->↵
|
67 | * <!-- end-user-doc -->↵ | | 67 | * <!-- end-user-doc -->↵
|
68 | * @generated↵ | | 68 | * @generated↵
|
69 | */↵ | | 69 | */↵
|
70 | public void fireNotifyChanged(Notification notification)↵ | | 70 | public void fireNotifyChanged(Notification notification)↵
|
71 | {↵ | | 71 | {↵
|
72 | changeNotifier.fireNotifyChanged(notification);↵ | | 72 | changeNotifier.fireNotifyChanged(notification);↵
|
|
73 | if (parentAdapterFactory != null)↵ | | 73 | if (parentAdapterFactory != null)↵
|
74 | {↵ | | 74 | {↵
|
75 | parentAdapterFactory.fireNotifyChanged(notification); | | 75 | parentAdapterFactory.fireNotifyChanged(notification);
|