Thursday, August 21, 2014

EASE - Eclipse Advanced Scripting Environment launched

It's been a while since I last wrote about EASE. Not writing about it does not mean that we were lazy. We applied for an official eclipse project and were busy setting up the infrastructure.

So please welcome the new Eclipse citizen: EASE.


What it does for you

EASE allows to write, maintain and execute scripts right within your IDE. Executed scripts run in the context of the Eclipse JRE, allowing to access all Java classes in your Eclipse universe. Thus you can manipulate and extend your IDE without the need to write plugins, pack them into features, export them into a p2 repository, install, restart, ...

As accessing Java code from script languages is typically an annoying task ("If I could write Java code I would do it in Java, why scripting?") EASE provides extension points to encapsulate typical actions into simple script commands. Basically it allows to create wrappers in the target script language to access Java methods. We already started writing some useful modules. The Modules Explorer view gives a short overview of the available commands (hint: try DND).


You already have a nice API to use? Great, just wrap() it from your script or register it via extension point.

Scripts may include other scripts using URIs. You could even access your scripts using http.To register script locations check your preferences in Preferences/Scripting.

Current UI integration gives access to a nice interactive shell to play around with, script recording and launch support.



Right, where do I get it from?

You find the update site locations on our webpage. We are focusing on Eclipse Luna, so if you are using something older and things do not work as expected, let us know.


Contribute? It's easier than you thought

Contribution is not only about writing code. Just test EASE and let us know what you think of it. Fill the bugtracker with ideas, design icons, write help, provide sample scripts - there are so many things that need a little care.


What's next

This summer we received a great contribution via Google Summer of Code. Martin Kloesch developed a Jython debugger which will be available on the update sites soon.

UI integration to bind scripts to menus and toolbars is basically working, but needs some tweaking.

A set of core modules needs to evolve. Currently we are playing around with the functions, but we need a stable script API for those modules rather soon.

... and I know we have to write lots of help and tutorials to make this project useful for you out there.

3 comments:

  1. Great job!

    But there are some problems with JDK 1.8.0 and Nashorn.
    When I run in the console:
    -----------------------------------------------------------------------------------------------
    loadModule('/System/UI')
    showQuestionDialog("test1","test2")
    -----------------------------------------------------------------------------------------------

    everything works fine but when I create script with the same content and try to run it via "Run As -> EASE Script" I've got the following error:

    -----------------------------------------------------------------------------------------------
    java.lang.NullPointerException
    at org.eclipse.ease.lang.javascript.nashorn.NashornScriptEngine.setVariable(NashornScriptEngine.java:34)
    at org.eclipse.ease.ui.launching.EaseLaunchDelegate.launch(EaseLaunchDelegate.java:270)
    at org.eclipse.ease.ui.launching.EaseLaunchDelegate.launch(EaseLaunchDelegate.java:132)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:883)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
    at org.eclipse.ease.ui.launching.EaseLaunchDelegate.launch(EaseLaunchDelegate.java:224)
    at org.eclipse.ease.ui.launching.EaseLaunchDelegate.launch(EaseLaunchDelegate.java:85)
    at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:431)
    at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:74)
    at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:123)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    [...]
    -----------------------------------------------------------------------------------------------

    My environment:

    -----------------------------------------------------------------------------------------------
    eclipse.buildId=4.4.0.I20140606-1215
    java.version=1.8.0_05
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
    Framework arguments: -product org.eclipse.epp.package.cpp.product
    Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product
    -----------------------------------------------------------------------------------------------

    When I use jdk1.7.0 and Rhino everything works as expected.

    ReplyDelete
    Replies
    1. created and fixed bug 442319.
      Please upgrade EASE after the next nightly build (in approx 8 hours) or select the rhino engine in your launch configuration (automatically created after the first contextual launch).

      Thanks for reporting.

      Delete
    2. Now everything works fine. Thanks for really quick bug fix!

      Delete