From 82a773fbfa81a3e40b10272526eee52324f2e8d2 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Tue, 17 Oct 2017 13:37:42 +0300 Subject: [PATCH] Retrieving UpdateNodes with a Resource reference --- org.simantics.interop.update/scl/Interop/Update.scl | 6 ++++++ .../src/org/simantics/interop/update/model/UpdateTree.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/org.simantics.interop.update/scl/Interop/Update.scl b/org.simantics.interop.update/scl/Interop/Update.scl index e04cb34..06e7785 100644 --- a/org.simantics.interop.update/scl/Interop/Update.scl +++ b/org.simantics.interop.update/scl/Interop/Update.scl @@ -26,6 +26,9 @@ importJava "org.simantics.interop.update.model.UpdateTree" where @JavaName getRootNode getRootNode :: UpdateTree -> UpdateNode + @JavaName getNode + getNode :: UpdateTree -> Resource -> Maybe UpdateNode + importJava "org.simantics.interop.update.model.UpdateList" where data UpdateList @@ -114,6 +117,9 @@ importJava "org.simantics.interop.update.model.UpdateOp" where importJava "org.simantics.utils.datastructures.Pair" where data Pair + @JavaName "" + createPair :: Maybe a -> Maybe b -> Pair + @JavaName first getFirst :: Pair -> Maybe a 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 8163306..a2066f4 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 @@ -78,7 +78,7 @@ public class UpdateTree { return node; } - protected UpdateNode getNode(Resource r) { + public UpdateNode getNode(Resource r) { return nodes.get(r); } -- 2.47.1