From 7f68ba3a14669671b3fc6f79f4c190d467dd1413 Mon Sep 17 00:00:00 2001 From: luukkainen Date: Thu, 28 Apr 2011 15:08:07 +0000 Subject: [PATCH] Builtins removed git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@20619 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/interop/browsing/ImportNode.java | 1 - .../src/org/simantics/interop/browsing/ImportNode2.java | 1 - .../src/org/simantics/interop/test/GraphComparator.java | 6 +++--- .../org/simantics/interop/test/GraphComparatorViewer.java | 6 ++++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java b/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java index 9719169..51ef7e9 100644 --- a/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java +++ b/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java @@ -7,7 +7,6 @@ import java.util.List; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.simantics.browsing.ui.content.Labeler.Modifier; -import org.simantics.db.Builtins; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Session; diff --git a/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java b/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java index d4122cc..8bb6d74 100644 --- a/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java +++ b/org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java @@ -7,7 +7,6 @@ import java.util.List; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.simantics.browsing.ui.content.Labeler.Modifier; -import org.simantics.db.Builtins; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Session; 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 10f1265..d9d2657 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -19,7 +19,6 @@ import java.util.Comparator; import java.util.List; import java.util.Stack; -import org.simantics.db.Builtins; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Statement; @@ -27,6 +26,7 @@ import org.simantics.db.exception.DoesNotContainValueException; import org.simantics.db.exception.ManyObjectsForFunctionalRelationException; import org.simantics.db.exception.ServiceException; import org.simantics.db.exception.ValidationException; +import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.utils.datastructures.BijectionMap; import org.simantics.utils.datastructures.MapList; @@ -58,7 +58,7 @@ public class GraphComparator { // runtime attributes private ReadGraph g; - private Builtins b; + private Layer0 b; ArrayList rs1 = new ArrayList(); ArrayList rs2 = new ArrayList(); @@ -91,7 +91,7 @@ public class GraphComparator { public void test(ReadGraph g, Resource r1, Resource r2) throws ServiceException, DoesNotContainValueException, ValidationException { this.g = g; - this.b = g.getBuiltins(); + this.b = Layer0.getInstance(g); changes1.clear(); changes2.clear(); diff --git a/org.simantics.interop/src/org/simantics/interop/test/GraphComparatorViewer.java b/org.simantics.interop/src/org/simantics/interop/test/GraphComparatorViewer.java index fdf1c81..fa65da4 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparatorViewer.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparatorViewer.java @@ -45,6 +45,7 @@ import org.simantics.db.exception.ServiceException; import org.simantics.db.exception.ValidationException; import org.simantics.db.request.Read; import org.simantics.db.service.SerialisationSupport; +import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.ui.SimanticsUI; import org.simantics.ui.dnd.LocalObjectTransfer; @@ -123,8 +124,9 @@ public class GraphComparatorViewer extends ViewPart{ @Override public void run(final ReadGraph graph) throws DatabaseException { comparator.clearRels(); - comparator.addTraversed(graph.getBuiltins().ConsistsOf); - comparator.addTested(graph.getBuiltins().IsWeaklyRelatedTo); + Layer0 l0 = Layer0.getInstance(graph); + comparator.addTraversed(l0.ConsistsOf); + comparator.addTested(l0.IsWeaklyRelatedTo); comparator.test(graph, r1, r2); BijectionMap map = comparator.getComparable(); Map indices = new HashMap(); -- 2.47.1