]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Builtins removed
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 28 Apr 2011 15:08:07 +0000 (15:08 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 09:22:14 +0000 (11:22 +0200)
git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@20619 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java
org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java
org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java
org.simantics.interop/src/org/simantics/interop/test/GraphComparatorViewer.java

index 9719169fad1e5015b1b7ac8594acec13210e8f8e..51ef7e97e8934cd80b8502ff8714d16a833ab70a 100644 (file)
@@ -7,7 +7,6 @@ import java.util.List;
 import org.eclipse.jface.resource.ImageDescriptor;\r
 import org.eclipse.jface.viewers.ISelection;\r
 import org.simantics.browsing.ui.content.Labeler.Modifier;\r
-import org.simantics.db.Builtins;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
index d4122cc0682eedfe9cb7020bfa29f570ca53335d..8bb6d7492747cf5e15e93a6fec807fa46e8fb2f1 100644 (file)
@@ -7,7 +7,6 @@ import java.util.List;
 import org.eclipse.jface.resource.ImageDescriptor;\r
 import org.eclipse.jface.viewers.ISelection;\r
 import org.simantics.browsing.ui.content.Labeler.Modifier;\r
-import org.simantics.db.Builtins;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
index 10f12654342721588080b623913650544a699ac9..d9d26579899e8f3b9fe8e865c25b82a1880cafa2 100644 (file)
@@ -19,7 +19,6 @@ import java.util.Comparator;
 import java.util.List;\r
 import java.util.Stack;\r
 \r
-import org.simantics.db.Builtins;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Statement;\r
@@ -27,6 +26,7 @@ import org.simantics.db.exception.DoesNotContainValueException;
 import org.simantics.db.exception.ManyObjectsForFunctionalRelationException;\r
 import org.simantics.db.exception.ServiceException;\r
 import org.simantics.db.exception.ValidationException;\r
+import org.simantics.layer0.Layer0;\r
 import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.utils.datastructures.BijectionMap;\r
 import org.simantics.utils.datastructures.MapList;\r
@@ -58,7 +58,7 @@ public class GraphComparator {
        // runtime attributes\r
        \r
        private ReadGraph g;\r
-       private Builtins b;\r
+       private Layer0 b;\r
        \r
        ArrayList<Resource> rs1 = new ArrayList<Resource>();\r
        ArrayList<Resource> rs2 = new ArrayList<Resource>();\r
@@ -91,7 +91,7 @@ public class GraphComparator {
        \r
        public void test(ReadGraph g, Resource r1, Resource r2) throws ServiceException, DoesNotContainValueException, ValidationException {\r
                this.g = g;\r
-               this.b = g.getBuiltins();\r
+               this.b = Layer0.getInstance(g);\r
                \r
                changes1.clear();\r
                changes2.clear();\r
index fdf1c81448cb7597c91a346b1a562e16d54792ef..fa65da422b9123dbbca396483226f69d5b712899 100644 (file)
@@ -45,6 +45,7 @@ import org.simantics.db.exception.ServiceException;
 import org.simantics.db.exception.ValidationException;\r
 import org.simantics.db.request.Read;\r
 import org.simantics.db.service.SerialisationSupport;\r
+import org.simantics.layer0.Layer0;\r
 import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.ui.SimanticsUI;\r
 import org.simantics.ui.dnd.LocalObjectTransfer;\r
@@ -123,8 +124,9 @@ public class GraphComparatorViewer extends ViewPart{
                        @Override\r
                        public void run(final ReadGraph graph) throws DatabaseException {\r
                                comparator.clearRels();\r
-                               comparator.addTraversed(graph.getBuiltins().ConsistsOf);\r
-                               comparator.addTested(graph.getBuiltins().IsWeaklyRelatedTo);\r
+                               Layer0 l0 = Layer0.getInstance(graph);\r
+                               comparator.addTraversed(l0.ConsistsOf);\r
+                               comparator.addTested(l0.IsWeaklyRelatedTo);\r
                                comparator.test(graph, r1, r2);\r
                                BijectionMap<Statement, Statement> map = comparator.getComparable();\r
                                Map<Statement, Integer> indices = new HashMap<Statement, Integer>();\r