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