1 / 7

Spray A Quick way of Creating Graphiti

Spray A Quick way of Creating Graphiti. A (very) short Introduction Jos Warmer (jos.warmer@openmodeling.nl). Graphiti Approach. No code generation but: Uses a runtime engine Programmed using a Java API Easy (relatively) to understand code Easy to keep up with evolving metamodel But …

alima
Download Presentation

Spray A Quick way of Creating Graphiti

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spray A Quick way of Creating Graphiti A (very) short Introduction Jos Warmer (jos.warmer@openmodeling.nl)

  2. Graphiti Approach • No code generation but: • Uses a runtime engine • Programmed using a Java API • Easy (relatively) to understand code • Easy to keep up with evolving metamodel • But … • Programming the editor in Java is much (simple and repetitive) work

  3. The Spray Graphiti Generator • Started out as generic generator • Had to be adapted to the PMW project • Is currently partly generic, partly project specific • Used by non IT users in production • Works well (at least for PMW )

  4. Define visualization for metaclass Product Icon shown in palette The Spray DSL Definition of shape class Product icon "Product16.png": container (figure="PmwProduct“) [ text ( bold ) "Product“ ; text ( italic) name ; text ( normal) "V" version ; ] [ referenceattributeSpecs : connection ( ) reference note : connection ( ) ] behavior [ createpalette“PartPalette” openVersionedPartEditor"Open Part“ ; selectInExplorer"Select In Explorer“; deletePart"Delete Part" ; refresh "Refresh Diagram“ ; ] References to properties of Product Contents of the container References of product shown as connections Will be in palette to create in named compartment Behaviour for Product shape Popup menu

  5. Define visualization for metaclassConceptComposition The Spray DSL class ConceptComposition icon "connection16.gif“ : connection(width=2) [ from part to concept toTextmultiplicity ] Shown as a connection (line) Part and concept are references in class ConceptComposition Text to show at the “to” side, also options for “from” and middle of connection

  6. Spray Generator • Using textual model to define graphical editor  • Xtext, Xtend, Xpand • Mixing generated and handwritten code by design • Uses Generation Gap pattern • Full access to Graphiti API • Managed by simply moving a generated file from “src-gen” to “src” folder • Generation of code from Spray DSL remains possible in full project life-cycle.

  7. Spray Future • Spray will become open source later this year • Oops, already there  at: http://code.google.com/a/eclipselabs.org/p/spray/ • Version 0.1 will be the version used for PMW • Need to generalize PMW specific generator code • and then … first contribution expected a.s.a.p. • EPL License • Might become an Eclipse project (or part of an existing Eclipse project) • Plans • Growing Spray by adding more features as we go …..

More Related