Launching with EASE

Launching with EASE - using auto completion
Launching with EASE – using auto completion

I have been doing some experiments with Eclipse EASE in preparation for determining the suitability – and creating a prototype – of using EASE with non-JVM scripting languages, in particular Python (CPython specifically).

To achieve this end goal I am working on a new module, /System/Launch, to allow me to explore that functionality. As a practical goal I am trying to use EASE to solve a long term problem of how to launch more complicated systems, especially those that run out of steam with the Launch Groups. For instance, multiple launches for debugging a multi-core system (especially with customizations and interdependencies) or parametrization of job launches.

Scripted Launch Group

As a starting point I want to simply re-create what Launch Groups can do in Javascript. So with EASE installed, including my new module, this is what a simple Launch Group replacement looks like.

The Launch Module

The Launch Module is a new module under consideration for EASE (Bug 478397). Its key method is the “launch” method which takes a Launch Configuration Name and an optional Launch Mode. The method then loads the named launch configuration and launches it, finally returning an ILaunch to allow future interaction with.

By using the launch method multiple times, with some additional control around it, allows complex launch sequences to be created.


For these examples I have already created three launch configurations for my individual tools (the name of the launch configuration is the quoted string in the bullet list):

  • “Prepare” – An External Tools configuration which prepares my test environment
  • “Server” – A PyDev supplied, Python Run configuration to launch my Python server
  • “Client” – A Java configuration to launch my Java client

Running The Examples

  1. Create three launch configurations named as above.
  2. Clone/Import “JavaScript Snippets” project. The examples are located in org.eclipse.ease.scripts git repository (or will be soon, follow Bug 478397 to find out more).
  3. Open the scripts in “Launch Module Examples” folder.
  4. Right-click on the desired script
  5. Choose Run As –> EASE Script

Alternatively paste the lines from the examples into the Rhino Script Shell console (as in the screenshot above). You get auto-completion of the names of the launch configurations and the launch modes too!

Example 1 – Fire and forget

In this first example, we simply launch the Client in Debug mode.


launch("Client", "debug")

Line 1: load the Launch module, this populates the namespace with all the methods defined in the Launch module.
Line 3: launch the existing launch configuration “Client” in debug mode.

Example 2 – Replicate Functionality from Launch Groups

In this example, we prepare our environment with the “Prepare” configuration, then launch the “Server” and “Client” configurations.


prepare = launch("Prepare")
while (!prepare.isTerminated()) {


launch("Client", "debug")

Line 1: load the Launch module
Line 3: launch the Prepare configuration
Line 4-6: Busy-wait until the Prepare launch has terminated[1]
Line 8: launch the server
Line 9: Wait 3 seconds for the server to be ready
Line 11: launch the client in Debug mode

Example 3 – Terminating the Server Automatically

Example 1 and 2 are a promising start, but do not yet add any new functionality to Eclipse. So what do you do if you want the server to stop automatically when you finish debugging your client. Well that is really easy now, just monitor the client launch and terminate the server.


prepare = launch("Program prepare")
while (!prepare.isTerminated()) {

server = launch("Python Server")

client = launch("Java Client", "debug")
while (!client.isTerminated()) {

Line 1-7: the same as Example 2
Line 8: launch the Server, but keep a handle of the ILaunch
Line 9: Wait 3 seconds for the server to be ready
Line 11: launch the Client
Line 12-14:Busy-wait until the Client debug session launch has terminated[1]
Line 15: terminate the server

This is a screenshot that shows what the Debug View looks like when we are busy-waiting on line 12.
At the top is the EASE Script launch of the example.
Then is the now terminated Prepare launch.
Followed by the still running Server in Run mode.
And finally, the Java Client, in Debug mode stopped at a breakpoint in main.

Terminating the Server Automatically – Debug View

More Advanced Options

With the full power of the scripting language you can take these examples to the next step. A good place to start would be to remove the 3 second delay on Line 9 and replace that with some logic that actually determines if the server is ready to accept connections.

Other Functionality in the Launch Module

The Launch module is very new and I invite additional contributions to it to make it more useful. For now this is a quick overview of what it does:

String[] getLaunchConfigurationNames()

Returns an array of all the Launch Configuration Names known to the Launch Manager. These names can be used as the argument to the getLaunchConfiguration, launch and launchUI methods.

ILaunchConfiguration[] getLaunchConfigurations()

Returns an array of all the Launch Configurations known to the Launch Manager. These can be used as the argument to launch and launchUI methods.

ILaunchConfiguration getLaunchConfiguration(String name)

Return the launch configuration given by name parameter. The launch configuration can be edited or otherwise operated on. See ILaunchConfiguration.getWorkingCopy().

ILaunch launch(String launchConfigurationName, String mode)
ILaunch launch(ILaunchConfiguration configuration, String mode)

Launch the configuration either given by name or a launch configuration and return the ILaunch for further processing. This is the way to launch a configuration within a script which is itself launched.

ILaunch launchUI(String launchConfigurationName, String mode)
ILaunch launchUI(ILaunchConfiguration configuration, String mode)

Launch the configuration in the UI thread. This method respects the workspace settings for things like building before launching.

ILaunchManager getLaunchManager()

Obtain the platform launch manager. This allows access to the Eclipse debug core launch manager, allowing control over all non-UI aspects of launches. The most valuable of these should be wrapped for ideal script usage and made available in the module itself.[2]


1. A better API than busy-waiting is probably desired here, but that is for another day (and more Javascript knowledge).
2. Additional UI functionality is within the DebugUITools class, enabling access to this class directly from within the launch module is an option. Additionally, a Debug module would be very useful.

Eclipse Night London

Eclipse Night London was an evening for bringing together various folks of the Eclipse ecosystem (new and old) to talk tech and share a bite & a beverage (or two). The ultramodern offices of Stackoverflow Careers in London provided a great setting for the event. The relentless rain didn’t put off the attendees, some of whom were coming from as far afield as Cambridge and Oxfordshire.

Emanuel of Genuitec & Tracy of KichwaCoders ready to kick things off

First up was Ian Mayo who demoed Debrief, a maritime analysis workbench based on Eclipse RCP that is used by the royal navy. Deftly going from slick demo to slick demo it was great to learn and watch. The best bit was saved for last, watching the visualisation of the manoeuvering of two submarines onscreen.

Matt Gerring talked to us about how Eclipse is used at Diamond Light Source, the synchrotron in Oxfordshire dubbed the UK’s biggest experiment. The experimental facility at Diamond handles tremendous amounts of data daily and the DAWNSci project is the workbench that helps the scientists make sense of it. Despite some tech gremlins interfering, Matt was able to talk us through it and demo some of the powerful capabilities of DAWNSci, which build on lots of existing projects in Eclipse and is part of the Eclipse Science Working Group.

Genuitec were the main sponsors of the evening and my co-host Emanuel Darlea spoke about the Eclipse based projects they have to offer, including MyEclipse and Secure Delivery Centre. That led nicely into the break and time for more refreshments and chatting.

Mmm sushi

Mike Milikovich, Executive Director of the Eclipse Foundation gave us an awesome overview of how Eclipse has evolved over the years, and how it continues to do so, now including Cloud and IoT platforms under its wide umbrella. It was really interesting hearing about the ‘survival of the fittest’ approach to open source and how this means the Foundation have no idea what comes next – it is whatever technology evolves best. Also Mike talked about how the biggest challenge to Eclipse is not another IDE or technology or foundation but simply complacency, by its members and users. IMG_20150916_202244

As if on cue, Alex Blewitt took the stage and inspired us all with his tongue-in-cheek presentation ‘How to write bad eclipse plugins‘. It was a terrific talk, full of energy, humour and insights into the bad bad practices we may sometimes slip into (but my plug-ins are more important than all the others..). It rounded of the evening in grand style and the presentation is worth checking out here, plus for a little taste of the talk on the night watch this.


By the end the room was buzzing, conversations flowed, more drinks were had, and eventually relocated to the pub downstairs. Stackoverflow offices were great, especially thanks to Natalie and her team who made us feel very welcome and ensured we had everything we needed on the evening. Many thanks to the folks who braved the rain to make it such a great event. Also thanks to the folks behind the scenes who made it happen: Tim & Sara from Genuitec and Jelena from Eclipse Foundation. It was a great evening for learning, sharing and enjoying good company. We’ll definitely be doing it again, join the Eclipse London User Group so we’ll let you know when.

Tremendous Tech in Trondheim

Trondheim is tiny – at least to someone who lives in the shadow of London. So it was eye-opening for me, over four short days, to immerse myself in the fully formed tech scene of a region with a population 2% of that of London’s.

Ocean Space Research at Marintek

Ocean Space – I’d never heard the term before so it took me a moment to understand, that as opposed to outer space, this refers to the vast unexplored regions below the sea-line which we know less about than the surface of the moon. This is the heart of what Marintek do, and they were the hosts for the science working group meeting I was there for, but more about that later. The work done at Marintek is fascinating, but I will limit it to my 3 highlights:

  • Ocean labs and  towing tanks are used for simulating conditions at sea, for example, oil rigs in the ocean. Yes the tanks are bigger than swimming pools. Yes they could generate all sorts of waves. No we couldn’t swim in them (or take selfies for that matter).
  • Floating wind turbines –  I heard about them first here – harnessing wind power in the deep sea, amazing!
  • Cavitation tunnels – first the science lesson: air bubbles under pressure actually boil at low temperatures, causing implosions aka cavitation – how great is that? So great, I’m linking to this video again so you don’t miss it.   Well, actually it’s not so great for badly designed propellers. Luckily this can all be tested for in a cavitation tunnel.

The icing on the cake for the visit was hearing about the plans for a bigger and better ocean space centre,  opening in 2020 (assuming the politics all works out as planned). Who knows what else the great depths have to offer mankind?

Continue reading Tremendous Tech in Trondheim

Is Your Open Source Community Still Telling Newbies to RTFM?

Recently, I was shocked to see a newbie being told to RTFM in a forum for an open source community I have been part of for years. It seemed so ludicrous at first I thought it must be a parody.  My disbelief was akin to seeing a roof being built with asbestos “Are we seriously still doing that?”.

Ok, ok, I’ll admit in the very early part of my career, I would have condoned replying to someone in a forum in that way. After all we were busy programmers, under pressure to get things done, why should we waste our time on users who couldn’t even be bothered to try to help themselves? It was a quick way to set them straight.

Knowing this was the culture, it would take me ages crafting a question to an open source community, spelling out the manuals I’d already read and things I’d googled before asking for help. Often I wouldn’t even bother posting at all. I could easily handle being ignored, but not the subconscious fear of an RTFM. Over the years I’ve come to appreciate how really toxic such responses are for open source communities and their growth.

It was oh so arrogant and often too easily done, but I’m glad I now know better. Asking someone to RTFM is never justified and always unprofessional. I was glad to see that in this specific case, another member of the community jumped in to help the newbie and a senior member of the community put out a request to keep things civil.

Like me, the communities are growing up too. One of the best things to happen in the Eclipse community has been establishing a code of conduct, not just for conferences but for daily dealings of the community. Yes, as I found out, it turns out we really do need one after all – laid out in writing for all to share as the common culture. The best bit? Now if you see someone exhibit this behaviour, you can take them quietly aside and ask them to Read The, erm, Manual.

Autocomplete Java In Python using Py4J

Py4J provides a way to access Java objects from a Python interpreter. It can now be used to autocomplete Java objects from an interactive environment like PyDev, IPython or IPython Notebook.

DAWN uses Py4J as one of the technologies that provides integration of Java and Python for science. A great new feature of DAWN is the ability to record macros for scripting of plotting operations. Previously, objects in Java could not be auto-completed in the console even though they were accessible using Py4J.  We worked on extending Py4J (thanks to funding from DAWN & Diamond Light Source) to enable that feature and support the following:

  • Autocompletion of Java method and field names of class instances
  • Auto-generated pop-up help,  based on signatures, of Java methods

The changes were recently reviewed and we are happy to report that they are now part of Py4J and available for anyone to use to get autocompletion of Java from Python and make life easier for their users.