NotificationChain changeNotificationChain = new NotificationChainImpl(); changeNotificationChain.add(model, Notification.SET, feature, oldValue, newValue); changeNotificationChain.dispatch();
NotificationChain changeNotificationChain = new NotificationChainImpl(); changeNotificationChain.add(model.getChildren(), Notification.REMOVE, child); changeNotificationChain.dispatch();In this example, the element child is removed from the model by unregistering it with the add() method using the REMOVE notification type. Like before, the changes are dispatched with the dispatch() method. Overall, the org.eclipse.emf.common.notify package library is a useful tool for simplifying the notification process in Java. It is often used in modeling frameworks and applications to manage changes made to model elements.