]> gerrit.simantics Code Review - simantics/interop.git/blobdiff - org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateList.java
Handle asserted property statements
[simantics/interop.git] / org.simantics.interop.update / src / org / simantics / interop / update / model / UpdateList.java
index 6f66ba399326f0eb4ffa480d3b9d3874c54841f4..21cde66e1c461e3b4ebb70444b3cccbf3fc282f2 100644 (file)
@@ -10,6 +10,7 @@ import org.simantics.db.Resource;
 import org.simantics.db.Statement;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.interop.test.GraphChanges;
+import org.simantics.interop.test.GraphChanges.Modification;
 import org.simantics.utils.datastructures.Pair;
 
 public class UpdateList {
@@ -23,15 +24,15 @@ public class UpdateList {
                this.changes = new HashSet<>(changes);
        }
        
-       public UpdateList(GraphChanges graphChanges, Collection<Pair<Statement, Statement>> coll) {
+       public UpdateList(GraphChanges graphChanges, Collection<Modification> coll) {
                this.changes = new HashSet<>();
-               for (Pair<Statement, Statement> p : coll) {
-                       changes.add(create(graphChanges, p));
+               for (Modification p : coll) {
+                       changes.add(create(graphChanges, p.getLeftSub(),p.getRightSub(),new Pair<Statement, Statement>(p.getLeftStm(), p.getRightStm())));
                }
        }
        
-       protected PropertyChange create(GraphChanges changes, Pair<Statement, Statement> change) {
-               return new PropertyChange(changes, change);
+       protected PropertyChange create(GraphChanges changes, Resource left, Resource right, Pair<Statement, Statement> change) {
+               return new PropertyChange(changes, left,right, change);
        }
        
        public Collection<PropertyChange> getChanges() {