1 | @Override↵ | | 1 | @Override↵
|
2 | public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)↵ | | 2 | public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (isNotificationRequired())↵ | | 4 | if (isNotificationRequired())↵
|
5 | {↵ | | 5 | {↵
|
6 | EStructuralFeature feature = oldObject.getEStructuralFeature();↵ | | 6 | EStructuralFeature feature = oldObject.getEStructuralFeature();↵
|
7 | Object oldValue = oldObject.getValue();↵ | | 7 | Object oldValue = oldObject.getValue();↵
|
8 | Object newValue = newObject.getValue();↵ | | 8 | Object newValue = newObject.getValue();↵
|
9 | NotificationImpl notification = ↵ | | 9 | NotificationImpl notification = ↵
|
10 | createNotification↵ | | 10 | createNotification↵
|
11 | (Notification.SET,↵ | | 11 | (Notification.SET,↵
|
12 | feature,↵ | | 12 | feature,↵
|
13 | oldValue,↵ | | 13 | oldValue,↵
|
14 | newValue,↵ | | 14 | newValue,↵
|
15 | feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,↵ | | 15 | feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,↵
|
16 | true);↵ | | 16 | true);↵
|
|
17 | if (notifications != null)↵ | | 17 | if (notifications != null)↵
|
18 | {↵ | | 18 | {↵
|
19 | notifications.add(notification);↵ | | 19 | notifications.add(notification);↵
|
20 | }↵ | | 20 | }↵
|
21 | else↵ | | 21 | else↵
|
22 | {↵ | | 22 | {↵
|
23 | notifications = notification;↵ | | 23 | notifications = notification;↵
|
24 | }↵ | | 24 | }↵
|
25 | }↵ | | 25 | }↵
|
26 | return notifications;↵ | | 26 | return notifications;↵
|
27 | }↵ | | 27 | }↵
|
|
28 | public NotificationChain inverseTouch(Object object, NotificationChain notifications)↵ | | 28 | public NotificationChain inverseTouch(Object object, NotificationChain notifications)↵
|
29 | {↵ | | 29 | {↵
|
30 | if (isNotificationRequired())↵ | | 30 | if (isNotificationRequired())↵
|
31 | {↵ | | 31 | {↵
|
32 | Entry entry = (Entry)object;↵ | | 32 | Entry entry = (Entry)object;↵
|
33 | EStructuralFeature feature = entry.getEStructuralFeature();↵ | | 33 | EStructuralFeature feature = entry.getEStructuralFeature();↵
|
34 | Object value = entry.getValue();↵ | | 34 | Object value = entry.getValue();↵
|
35 | NotificationImpl notification = ↵ | | 35 | NotificationImpl notification = ↵
|
36 | createNotification↵ | | 36 | createNotification↵
|
37 | (Notification.SET,↵ | | 37 | (Notification.SET,↵
|
38 | feature,↵ | | 38 | feature,↵
|
39 | value, ↵ | | 39 | value, ↵
|
40 | value,↵ | | 40 | value,↵
|
41 | feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,↵ | | 41 | feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,↵
|
42 | true);↵ | | 42 | true);↵
|
43 | ↵ | | 43 | ↵
|
44 | if (notifications != null)↵ | | 44 | if (notifications != null)↵
|
45 | {↵ | | 45 | {↵
|
46 | notifications.add(notification);↵ | | 46 | notifications.add(notification);↵
|
47 | }↵ | | 47 | }↵
|
48 | else↵ | | 48 | else↵
|
49 | {↵ | | 49 | {↵
|
50 | notifications = notification;↵ | | 50 | notifications = notification;↵
|
51 | }↵ | | 51 | }↵
|
52 | }↵ | | 52 | }↵
|
|
53 | return notifications; | | 53 | return notifications;
|