Skip to content

Eugenia: Affixed Nodes in GMF

From the following annotated Ecore metamodel (in Emfatic)

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

class ComponentDiagram {
   val Component[*] components;
   val Connector[*] connectors;

abstract class NamedElement {
   attr String name;

class Component extends NamedElement {
   val Port[*] ports;

@gmf.node(figure="rectangle", size="20,20", label="name",
  label.placement="external", label.icon="false")
class Port extends NamedElement {

}"source", target="target", label="name",
class Connector extends NamedElement {
   ref Port source;
   ref Port target;

Eugenia can automatically generate this GMF editor: