New in Epsilon 0.8.5

Apart from adding support for managing inconsistent EMF models with HUTN, and fixing several bugs, version 0.8.5 of Epsilon also includes a few new and noteworthy features.

Use of = both for assignment and for comparison

As EOL builds on OCL, it (re)uses = for comparison (e.g. if (a = b) {…}) and := for assignment (e.g. a := b;). As Louis reported here, this has been a source of confusion and well-camouflaged errors because when a mistyped a = b; assignment statement is executed, it will do nothing, but will not complain either. To deal with this we decided to follow the old VB6 paradigm and support = both for assignment (in addition to the := that of course still works) and for comparison. Therefore, since 0.8.5 the following code runs just fine:

var x = 2;
(x*x).println(); -- prints 4

Support for additional options in EuGENia

We’ve added support for several more options to EuGENia (the front-end provided by Epsilon for simplifying the development of GMF editors), such as for specifying if the model and the diagram are to be stored in the single file, for defining the extensions of the model and diagram files etc. A complete list of the supported options is available here. Kudos to Michael Moser for putting in these requests for enhancement in the bugzilla.

Support for float and double numbers in EOL

The EOL Real type now provides support both for Double and for Float numbers (only floats were supported up to 0.8.4). Kudos to Aleksander Bandelj for raising this issue in the bugzilla.

ANT tasks for EMF models

The new epsilon.emf.loadModel task has been added to the list of Epsilon ANT tasks as an alternative for the generic – but more cumbersome – epsilon.loadModel task. Using the new task, a sample UML model can be loaded as follows:

<project default="main">
  <target name="main">

    <epsilon.emf.loadModel
      name="MyUMLModel"
      modelfile="sample.uml"
      metamodeluri="http://www.eclipse.org/uml2/2.1.0/UML"
      read="true"
      store="false"
      />

    <epsilon.eol>
      MyUMLModel!Class.all.size().println();
      <model ref="MyUMLModel"/>
    </epsilon.eol>

  </target>
</project>

We’ve also added two more EMF-specific tasks. The epsilon.emf.register task, which registers the EPackages of an Ecore file to the EPackage registry:

<project default="main">
  <target name="main">

    <epsilon.emf.register
      file="sample.ecore"
    />

  </target>
</project>

and the epsilon.emf.loadRegisteredMetamodel which can load a registered EPackage as a model that can be then accessed by other Epsilon tasks:

<project default="main">
  <target name="main">

    <epsilon.emf.loadRegisteredMetamodel
      name="UMLM2"
      metamodeluri="http://www.eclipse.org/uml2/2.1.0/UML"
      />

    <epsilon.eol>
      UMLM2!EClass.all.size().println(); -- Prints 246
      <model ref="UMLM2"/>
    </epsilon.eol>

  </target>
</project>

We are working on more enhancements, such as support for multiple iterators in first order logic operations (kudos to Edd Turner), and Java-ifications for the upcoming 0.8.6 which will be made available in late June. Stay tuned!

About these ads
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s