Example: Creating custom Java tools for Epsilon

package org.eclipse.epsilon.examples.tools;

import org.eclipse.epsilon.eol.execute.context.Variable;
import org.eclipse.epsilon.eol.tools.AbstractTool;

public class SampleTool extends AbstractTool {
  protected String name;
  public void setName(String name) {
    this.name = name;
  public String getName() {
    return name;
  public String sayHello() {
    return "Hello " + name;
  // Creates a new variable called variableName
  // and adds it to the frame stack
  public void sayHelloAsVariable(String variableName) {
      createReadOnlyVariable(variableName, sayHello()));
var sampleTool = new Native("org.eclipse.epsilon.examples.tools.SampleTool");
sampleTool.name = "George";

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>

source.. = src/
output.. = bin/
bin.includes = META-INF/,\

Clone Epsilon's Git repository:

  • navigate to examples
  • import the org.eclipse.epsilon.examples.tools project

Once you have checked out/imported the code, to run the example you need to go through the following steps:

  1. register any .ecore metamodels in the org.eclipse.epsilon.examples.tools project
  2. right click the .launch file in the org.eclipse.epsilon.examples.tools project
  3. select Run as... and click the first item in the menu that pops up

What's this?

In this example, we create a custom tool for Epsilon.

What are .emf files?

.emf files are Ecore metamodels expressed using the Emfatic textual syntax.

More examples...

Epsilon Object Language
Epsilon Transformation Language
Epsilon Generation Language
Epsilon Validation Language
Epsilon Merging Language
Epsilon Flock
Epsilon Model Generation Language
Epsilon Pattern Language
Combining the Epsilon Languages

Even more examples...

More examples are available in the examples folder of the Git repository.