From: Marko Luukkainen Date: Tue, 21 Feb 2017 10:47:10 +0000 (+0200) Subject: Git acting up, and conflicting itself. This is a fix X-Git-Tag: v1.31.0~34 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=1e5befdca54cd12daed18b964da34a5902c02bac;p=simantics%2Finterop.git Git acting up, and conflicting itself. This is a fix refs #7045 Change-Id: Idbf8d79ec9dce3136f9dc85acf8675ab05911d83 --- diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/model/AddDeleteUpdateOp.java b/org.simantics.interop.update/src/org/simantics/interop/update/model/AddDeleteUpdateOp.java index 04d1584..901dc19 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/model/AddDeleteUpdateOp.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/model/AddDeleteUpdateOp.java @@ -17,11 +17,8 @@ import org.simantics.layer0.Layer0; public abstract class AddDeleteUpdateOp extends UpdateOp { -<<<<<<< HEAD protected boolean add; -======= - boolean add; ->>>>>>> branch 'master' of ssh://luukkainen@www.simantics.org:29418/simantics/interop + public AddDeleteUpdateOp(GraphChanges changes) { super(changes); diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateTree.java b/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateTree.java index 5af784e..b8e53f1 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateTree.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateTree.java @@ -37,7 +37,6 @@ public abstract class UpdateTree { return rootNode; } -<<<<<<< HEAD protected abstract UpdateNode createNode(Status status, Resource r); protected abstract UpdateNode createNode(Status status, UpdateOp op); @@ -69,47 +68,9 @@ public abstract class UpdateTree { UpdateNode node = createNode(r1, r2); connectParent(g,node); return node; - - } - - protected boolean connectParent(ReadGraph g, UpdateNode node) throws DatabaseException { -======= - protected abstract UpdateNode createNode(Status staus, Resource r); - protected abstract UpdateNode createNode(Status staus, UpdateOp op); - - private UpdateNode createNode(Resource r1, Resource r2) { - UpdateNode node = null; - if (r1 != null && r2 != null) { - node = createNode(Status.EXIST, r1); - nodes.put(r1, node); - nodes.put(r2, node); - } else if (r1 != null) { - node = createNode(Status.DELETED ,updateOps.getUpdateOp(r1)); - nodes.put(r1, node); - } else if (r2 != null) { - node = createNode(Status.NEW, updateOps.getUpdateOp(r2)); - nodes.put(r2, node); - } - return node; - } - - public UpdateNode addNode(ReadGraph g, Resource r1, Resource r2) throws DatabaseException { - if (r1 != null && r2 != null) { - return null; - } - if (nodes.containsKey(r1)) - return nodes.get(r1); - if (nodes.containsKey(r2)) - return nodes.get(r2); - - UpdateNode node = createNode(r1, r2); - connectParent(g,node); - return node; - } private boolean connectParent(ReadGraph g, UpdateNode node) throws DatabaseException { ->>>>>>> branch 'master' of ssh://luukkainen@www.simantics.org:29418/simantics/interop UpdateNode parent = null; while (true) { Resource parentResource = node.getParentResource(g);