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