--- /dev/null
+package org.simantics.diagram.adapter;
+
+import org.simantics.db.Resource;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.exception.DatabaseException;
+
+public interface ConnectionEvents {
+
+ public void connectionCreated(WriteGraph graph, Resource connection) throws DatabaseException;
+
+}
import org.simantics.db.exception.ValidationException;
import org.simantics.db.layer0.adapter.impl.EntityRemover;
import org.simantics.db.layer0.util.RemoverUtil;
+import org.simantics.diagram.adapter.ConnectionEvents;
import org.simantics.diagram.connection.ConnectionSegmentEnd;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.diagram.synchronization.graph.BasicResources;
OrderedSetUtils.addFirst(g, composite, connection);
g.claim(composite, br.L0.ConsistsOf, br.L0.PartOf, connection);
GraphLayerUtil.addToVisibleLayers(g, connection, composite);
+ ConnectionEvents events = g.getPossibleAdapter(composite, ConnectionEvents.class);
+ if(events != null)
+ events.connectionCreated(g, connection);
return connection;
}