Exemplo n.º 1
0
  /** @return an instance of {@link Employee} */
  private EmployeeImpl createEmployee() {

    EmployeeImpl e = (EmployeeImpl) CompanyFactory.eINSTANCE.createEmployee();
    e.setName("empl" + this.curImployeeID);
    e.setAge(42);
    e.setSalary(2345);
    this.curImployeeID++;
    this.allEmployees.add(e);
    if (this.comp.eResource() != null) {
      this.comp.eResource().getContents().add(e);
    }
    return e;
  }