From: Marko Luukkainen Date: Thu, 19 Sep 2019 14:29:37 +0000 (+0300) Subject: Clear for single functions + include interop.scl in the build X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F3268%2F1;p=simantics%2Finterop.git Clear for single functions + include interop.scl in the build gilab #13 Change-Id: I2b1e0e1b3c4c41b902e5e95cc667651275d9e200 --- diff --git a/org.simantics.interop.scl/scl/Interop/FunctionRegistry.scl b/org.simantics.interop.scl/scl/Interop/FunctionRegistry.scl index 9d707cf..bdba0e3 100644 --- a/org.simantics.interop.scl/scl/Interop/FunctionRegistry.scl +++ b/org.simantics.interop.scl/scl/Interop/FunctionRegistry.scl @@ -19,4 +19,15 @@ importJava "org.simantics.interop.scl.FunctionRegistry" where clear :: a -> () @JavaName clear - clearName :: a -> String -> () \ No newline at end of file + clearName :: a -> String -> () + + @JavaName clear + clearFunction :: a -> String -> (f -> ()) -> () + @JavaName clear + clearFunction1 :: a -> String -> (f -> b -> ()) -> () + @JavaName clear + clearFunction2 :: a -> String -> (f -> b -> c -> ()) -> () + @JavaName clear + clearFunction3 :: a -> String -> (f -> b -> c -> d -> ()) -> () + @JavaName clear + clearFunction4 :: a -> String -> (f -> b -> c -> d -> e -> ()) -> () \ No newline at end of file diff --git a/org.simantics.interop.scl/src/org/simantics/interop/scl/FunctionRegistry.java b/org.simantics.interop.scl/src/org/simantics/interop/scl/FunctionRegistry.java index 003a50a..efabdaa 100644 --- a/org.simantics.interop.scl/src/org/simantics/interop/scl/FunctionRegistry.java +++ b/org.simantics.interop.scl/src/org/simantics/interop/scl/FunctionRegistry.java @@ -78,5 +78,12 @@ public class FunctionRegistry { fmap.remove(name); } + public static void clear(Object key, String name,Function f) { + MapList fmap = map.get(key); + if (fmap == null) + return; + fmap.remove(name,f); + } + } diff --git a/pom.xml b/pom.xml index 8ca9be5..be0c16e 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,7 @@ org.simantics.xml.sax.base org.simantics.xml.sax.ontology org.simantics.xml.sax.ui + org.simantics.interop.scl org.simantics.excel.poi.feature org.simantics.interop.feature