From 66cdd1aef47bb1209a0e727dab409b98f6d100b4 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 19 Sep 2019 17:29:37 +0300 Subject: [PATCH] Clear for single functions + include interop.scl in the build gilab #13 Change-Id: I2b1e0e1b3c4c41b902e5e95cc667651275d9e200 --- .../scl/Interop/FunctionRegistry.scl | 13 ++++++++++++- .../org/simantics/interop/scl/FunctionRegistry.java | 7 +++++++ pom.xml | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) 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 -- 2.45.1