From: luukkainen Date: Thu, 19 Jan 2012 16:31:28 +0000 (+0000) Subject: refs #3138 X-Git-Tag: v1.31.0~97 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=020310b467ee9c4586117f7de377d256d756edb4;p=simantics%2Finterop.git refs #3138 git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@24013 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java index ab0d437..5ba622b 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -951,6 +951,7 @@ public class GraphComparator { * @throws ValidationException */ private void compareProps(Resource r1, Resource r2) throws ServiceException, DoesNotContainValueException, ValidationException { + System.out.println("compareProps " + r1 + " " + NameUtils.getSafeName(g, r1) + " " + r2 + " " + NameUtils.getSafeName(g, r2)); ArrayList ss1 = new ArrayList(); ArrayList ss2 = new ArrayList(); ss1.addAll(g.getStatements(r1, b.HasProperty)); @@ -982,6 +983,11 @@ public class GraphComparator { } Statement s1 = ss1.get(i1); Statement s2 = ss2.get(i2); + if (s1.isAsserted(r1) && s2.isAsserted(r2)) { + i1++; + i2++; + continue; + } int c = scomp.compare(s1, s2); switch (c) { case 0:{ @@ -997,7 +1003,8 @@ public class GraphComparator { addComparable(s1, s2, false); } } else { - compareProps(s1.getObject(), s2.getObject()); + if (!s1.getObject().equals(s1.getSubject()) && !s2.getObject().equals(s2.getSubject())) + compareProps(s1.getObject(), s2.getObject()); } } else { addModification(s1, s2); diff --git a/org.simantics.interop/src/org/simantics/interop/test/TypeComparator.java b/org.simantics.interop/src/org/simantics/interop/test/TypeComparator.java index 1417588..e3251ac 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/TypeComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/TypeComparator.java @@ -102,6 +102,11 @@ public class TypeComparator extends ResourceComparator { } Statement s1 = ss1.get(i1); Statement s2 = ss2.get(i2); + if (s1.isAsserted(r1) && s2.isAsserted(r2)) { + i1++; + i2++; + continue; + } int c = scomp.compare(s1, s2); switch (c) { case 0:{