Jump to: navigation, search

Difference between revisions of "JS4EMF"

(JS4EMF wiki content)
(Javascript for EMF)
 
Line 9: Line 9:
 
*databinding, by means of dependency recording
 
*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 also supports using Javascript for implementing invariants, constraints, derived features and operation bodies, using the EMF delegates mechanism. To make using these features easier JS4EMF contributes several views.  
  
 
== JS4EMF wiki content  ==
 
== JS4EMF wiki content  ==

Latest revision as of 04:55, 9 June 2011

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 delegates mechanism. To make using these features easier JS4EMF contributes several views.

JS4EMF wiki content

The JS4EMF wiki 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.
  • The EMF Delegates explains how to use Javascript for in invariants, constraints, derived features and operation bodies, based on the EMF delegates mechanism.