]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Handle added and removed properties as property modifications 18/4618/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 24 Nov 2020 12:22:32 +0000 (14:22 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 24 Nov 2020 12:22:32 +0000 (14:22 +0200)
Handling them as statement changes cause problems, if statements are
asserted (it is not possible to locate correct subject Resouce).

gitlab #25

Change-Id: I28cecb3f7df2369063b4d8fe1ca1ad2b7866b8b0

org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java

index 82320753c7a8eb81e8e1473b1b95954838e6d475..aae895b7a5835ce068829e6e4dffbefe3b8158ea 100644 (file)
@@ -1294,14 +1294,18 @@ public class GraphComparator {
                                }
                                case -1:{
                                        if (DEBUG) System.out.println("Compare Prop diff1s " + printStatement(g,s1));
-                                       addDeletion(s1);
+                                       // Use modification, since deletions do not support asserted statements
+                                       addModification(r1,s1,r2,null);
+                                       //addDeletion(s1);
                                        i1++;
                                        break;
                                }
                                        
                                case 1:{
                                        if (DEBUG) System.out.println("Compare Prop diff2s " + printStatement(g,s2));
-                                       addAddition(s2);
+                                       // Use modification, since additions do not support asserted statements
+                                       addModification(r1,null,r2,s2);
+                                       //addAddition(s2);
                                        i2++;
                                        break;
                                }