Small changes to synchronization base impl to allow extending it
[simantics/platform.git] / bundles / org.simantics.structural.synchronization / src / org / simantics / structural / synchronization / base / SynchronizationEventHandlerBase.java
index a6efeefb2534bc402c25cfc671705ccbb6ad0cbb..67b120b6462cc10b3e36364c70e884f91f8c9d9c 100644 (file)
@@ -248,7 +248,7 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
                     if(oldChildMap != null)
                         for(T component : oldChildMap.values()) {
                             component.clearParent();
-                            mapping.addPendingRemoval(component);
+                            addPendingRemoval(component);
                         }
                 }
                 // Alternative implementation when uids are not available.
@@ -275,7 +275,7 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
                     if(oldChildMap != null)
                         for(T component : oldChildMap.values()) {
                             component.clearParent();
-                            mapping.addPendingRemoval(component);
+                            addPendingRemoval(component);
                         }
                 }
 
@@ -334,6 +334,12 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
         }
     }
 
+    protected void addPendingRemoval(T component) {
+        if (TRACE_EVENTS)
+            System.out.println("addPendingRemoval(" + component.componentId + " : " + component.solverComponentName + ")");
+        mapping.addPendingRemoval(component);
+    }
+
     private String getSubprocessName(String name,
             Collection<SerializedVariable> properties) {
         for(SerializedVariable property : properties)