Eclipse Command Language
ECL stands for Eclipse Command Language, and it was developed and initially introduced by Xored at EclipseCon ‘08 in California. ECL has its own story. It goes back to the early history of Eclipse Platform which had always experienced a lack of Scripting and Automation solutions. This problem is not related to a particular programming (scripting) language but goes way further including an object model to script against it, data and code interoperability, and many more.
There were several projects trying to add easy scripting and automation to the platform; the most successful one was Eclipse Monkey (it was pretty dead before adopted widely). Monkey was using JavaScript as a scripting language and provided the object model (DOM) as a part of the project, which covered high level aspects of Eclipse APIs. However, we were not satisfied with Monkey’s approach either, including JavaScript used by this project.
What we did want from a Scripting-and-Automation solution is the following:
-
The scripting language should be CLI-oriented, which means an end user (software engineers, testers, etc.) must be able to do virtually anything with Eclipse from a console window, for example, the same way as with the Unix shell. Here is a simple but actual ECL sample:
create-project MyJavaProject -kind JavaThe scripting solution should be expressive. Our goal is to save time for software engineers and/or users, allowing to perform tasks faster then they would do with Java or JavaScript, or even using Eclipse UI:

Same functionality on Java would be more verbose.
-
The scripting solution must be a general purpose instrument. End users should be able to do virtually anything with their Eclipse environment using such a solution/language. As an example:

-
The scripting language should be extendable and let different adopters develop their own commands, which will be interoperable with other commands (such as Unix commands, for example). Moreover, these commands and internal data structures should be also interoperable with Eclipse Frameworks.
To see the full list of ECL commands with their usage examples, please take a look at generated documentation here.
Monday, Jan 1, 0001
Define EMF model for ShowViews command
Create Ecore Model Create model folder in the root directory of your plugin Right click on model folder and select New > Other… > Eclipse Modeling Framework > Ecore Model > Next Choose a name for your model. In our case it will be view.ecore Press Finish Created model will be …
Monday, Jan 1, 0001
ECL commands for Excel import and export
Export to Excel write-excel-file Writes tables from input pipe to into excel (xls or xlsx) file. Fails if file is not found or format is invalid. Input: tables (1, ∞) Table: Tables to write Parameters: uri String: URI to write Excel data to. Currently supported schemes are workspace:/ for files in …
Monday, Jan 1, 0001
ECL commands for XML import and export
XML export write-xml-file Writes tables from input pipe to into xml file Input: tree Tree: Tree to write Parameters: uri String: URI to write xml data to. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system. Output: The value of …
Monday, Jan 1, 0001
New Command Guide
In this guide we show different ways of extending an existing ECL commands functionality, such as: Retrieve an existing method of Java Object with get-object | invoke commands Create static methods and use it with invoke-static command Create your own custom ECL command Use invoke command to call an …