Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/codesync/RecordEventsListener.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/codesync/RecordEventsListener.java b/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/codesync/RecordEventsListener.java
index 0b3938d9e78..8ae6ee95b1d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/codesync/RecordEventsListener.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/codesync/RecordEventsListener.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.transaction.ResourceSetChangeEvent;
import org.eclipse.emf.transaction.ResourceSetListener;
import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
* This listener is used to register ADD ant SET about in the diff model during
@@ -68,6 +69,11 @@ public class RecordEventsListener implements ResourceSetListener {
int eventType = notification.getEventType();
if (notification.getNotifier() instanceof EObject) {
EObject notifier = (EObject) notification.getNotifier();
+
+ EObject baseElement = UMLUtil.getBaseElement(notifier);
+ if (baseElement != null) {
+ notifier = baseElement;
+ }
if ((eventType != Notification.REMOVING_ADAPTER) && (eventType != Notification.RESOLVE)) {
if ((notifier instanceof Element) || (notifier instanceof EAnnotation)) {
ChangeObject changeObject = new ChangeObject();

Back to the top