From: Marko Luukkainen Date: Tue, 17 Oct 2017 10:37:42 +0000 (+0300) Subject: Retrieving UpdateNodes with a Resource reference X-Git-Tag: v1.31.0~7 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=82a773fbfa81a3e40b10272526eee52324f2e8d2;p=simantics%2Finterop.git Retrieving UpdateNodes with a Resource reference --- 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); }