Jump to: navigation, search


Revision as of 05:52, 8 June 2011 by Hal.ntnu.no (Talk | contribs)

Javascript for EMF

Javascript for EMF provides support for using Mozilla'a Javascript implementation (Rhino) for scripting EMF and using EMF objects in Javascript code. Besides Javascript's existing support for using EMF objects as native Java objects, there is EMF-specific support for

  • using Ecore attributes (EAttribute) and references (EReference) as Javascript properties, with the . and [] notations,
  • implementing Ecore operations (EOperation) with Javascript code
  • adding Javascript functions as methods to Ecore classes (EClass) and individual objects (EObject)
  • listening to change notifications and calling event-handling methods
  • databinding, by means of dependency recording

JS4EMF also supports using Javascript for implementing invariants, constraints, derived features and operation bodies, using the EMF delegate mechanism. To make using these features easier, JS4EMF contributes several views.

JS4EMF wiki content

The [JS4EMF wiki|JS4EMF] includes the following contents:

  • The User Guide describes how the various views are used.
  • The Developer Guide explains how EMF objects are mapped to the Javascript object model and how to use Javascript for EMF scripting.