From 7c2f5fb4f80c3024c674c417799a2dc295a9bd03 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 28 Mar 2012 17:08:58 +0200 Subject: Migrate from BSF to javax.script. Update Mozilla Rhino JS engine. Removed some 'auto-generated' comments from intentionally blank methods. Other whitespace/comment cleanup. --- .classpath | 3 +- lib/bsf.jar | Bin 80528 -> 0 bytes lib/js.jar | Bin 597407 -> 1122370 bytes source/com/c2kernel/gui/tabs/CollectionPane.java | 2 - .../tabs/collection/CollectionHistoryWindow.java | 2 - .../gui/tabs/collection/DependencyView.java | 3 +- .../gui/tabs/outcome/form/field/ComboField.java | 2 +- source/com/c2kernel/scripting/Script.java | 70 ++++++++++----------- source/com/c2kernel/scripting/ScriptConsole.java | 48 ++++++-------- source/com/c2kernel/utils/ActDefCache.java | 2 - 10 files changed, 55 insertions(+), 77 deletions(-) delete mode 100755 lib/bsf.jar diff --git a/.classpath b/.classpath index 8889622..1fc556f 100644 --- a/.classpath +++ b/.classpath @@ -6,7 +6,6 @@ - @@ -14,7 +13,7 @@ - + diff --git a/lib/bsf.jar b/lib/bsf.jar deleted file mode 100755 index 619a135..0000000 Binary files a/lib/bsf.jar and /dev/null differ diff --git a/lib/js.jar b/lib/js.jar index f92e9f9..878b0d9 100755 Binary files a/lib/js.jar and b/lib/js.jar differ diff --git a/source/com/c2kernel/gui/tabs/CollectionPane.java b/source/com/c2kernel/gui/tabs/CollectionPane.java index a8abfcd..4d9092e 100644 --- a/source/com/c2kernel/gui/tabs/CollectionPane.java +++ b/source/com/c2kernel/gui/tabs/CollectionPane.java @@ -105,7 +105,5 @@ public class CollectionPane extends EntityTabPane implements EntityProxyObserver @Override public void control(String control, String msg) { - // TODO Auto-generated method stub - } } diff --git a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java index 0f3cc76..ee168b0 100644 --- a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java +++ b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java @@ -150,8 +150,6 @@ public class CollectionHistoryWindow extends JFrame { public void remove(String id) { } @Override public void control(String control, String msg) { - // TODO Auto-generated method stub - } } diff --git a/source/com/c2kernel/gui/tabs/collection/DependencyView.java b/source/com/c2kernel/gui/tabs/collection/DependencyView.java index 734d315..e068bdc 100644 --- a/source/com/c2kernel/gui/tabs/collection/DependencyView.java +++ b/source/com/c2kernel/gui/tabs/collection/DependencyView.java @@ -30,6 +30,5 @@ public class DependencyView extends CollectionView // TODO: design a nice dependency view, with property viewing and modification add(new JLabel("Dependency view not yet implemented. Please browse the tree instead.")); } - - + } diff --git a/source/com/c2kernel/gui/tabs/outcome/form/field/ComboField.java b/source/com/c2kernel/gui/tabs/outcome/form/field/ComboField.java index 62a900f..2c4ce05 100644 --- a/source/com/c2kernel/gui/tabs/outcome/form/field/ComboField.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/field/ComboField.java @@ -103,7 +103,7 @@ public class ComboField extends StringEditField { * @param param */ private void populateLOVFromLDAP(String param) { - // TODO '/root/path;prop=val;prop=val' + // TODO List of Values from LDAP properties, eg '/root/path;prop=val;prop=val' } diff --git a/source/com/c2kernel/scripting/Script.java b/source/com/c2kernel/scripting/Script.java index c056e95..ad98eb4 100644 --- a/source/com/c2kernel/scripting/Script.java +++ b/source/com/c2kernel/scripting/Script.java @@ -4,6 +4,9 @@ import java.io.StringReader; import java.util.ArrayList; import java.util.HashMap; +import javax.script.Bindings; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -19,8 +22,6 @@ import com.c2kernel.entity.proxy.AgentProxy; import com.c2kernel.entity.proxy.ItemProxy; import com.c2kernel.utils.LocalObjectLoader; import com.c2kernel.utils.Logger; -import com.ibm.bsf.BSFException; -import com.ibm.bsf.BSFManager; /************************************************************************** * @@ -37,11 +38,11 @@ public class Script String mScript = ""; String mName; String mVersion; - String mLang; HashMap mInputParams = new HashMap(); HashMap mAllInputParams = new HashMap(); ArrayList