Example: Implement a GMF editor with image nodes using EuGENia

@namespace(uri="friends", prefix="")
package friends;

class World {
  val Person[*] people;

  label.icon="false", label="name", label.placement="external")
class Person {
  attr String name;
  @gmf.link(width="2", color="0,255,0", source.decoration="arrow", 
    target.decoration="arrow", style="dash")
  ref Person[*] friendOf;
  @gmf.link(width="2", color="255,0,0", source.decoration="arrow", 
    target.decoration="arrow", style="dash")
  ref Person[*] enemyOf;
 * Copyright (c) 2009 The University of York.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * Contributors:
 *     Dimitrios Kolovos - initial API and implementation
package figures;

import org.eclipse.draw2d.ImageFigure;
import org.eclipse.epsilon.eugenia.examples.friends.figures.activator.PluginActivator;

 * @generated
public class PersonFigure extends ImageFigure {

  public PersonFigure() { 
        "images/Person.png").createImage(), 0);


Clone Epsilon's Git repository:

  • navigate to examples
  • import the org.eclipse.epsilon.eugenia.examples.friends project
  • import the org.eclipse.epsilon.eugenia.examples.friends.figures project

What's this?

In this example we use EuGENia to implement a GMF editor with images instead of shapes for nodes.

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.