• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Combining Text and Graphics in Eclipse-based Modeling Tools
 

Combining Text and Graphics in Eclipse-based Modeling Tools

on

  • 10,392 views

Lightning talk at EclipseCon 2010, Santa Clara, CA

Lightning talk at EclipseCon 2010, Santa Clara, CA

Statistics

Views

Total Views
10,392
Views on SlideShare
10,372
Embed Views
20

Actions

Likes
7
Downloads
525
Comments
0

1 Embed 20

http://www.slideshare.net 20

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Combining Text and Graphics in Eclipse-based Modeling Tools Combining Text and Graphics in Eclipse-based Modeling Tools Presentation Transcript

  • Combining Graphics and Text in Modeling Tools Jan Köhnlein
  • GMF Graphical
  • GMF Graphical Xtext Textual
  • GMF Graphical Just two different views on the same thing Xtext Textual
  • Synchronization
  • Xtext
  • Xtext Textual Model Serializer Parser Node Model Ecore Model Instance
  • Xtext XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance
  • Xtext XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance getContents()
  • Xtext load(), save() XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance getContents()
  • Xtext load(), save() XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance FragmentProvider getContents() getURIFragment() getEObject()
  • ResourceSet XtextResource DiagramResource
  • diagram change ResourceSet XtextResource DiagramResource
  • ResourceSet XtextResource DiagramResource
  • reparse() w/ errors ResourceSet XtextResource DiagramResource
  • ResourceSet XtextResource DiagramResource
  • ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource save() XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource reload() XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource reload() XtextResource DiagramResource
  • Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • Demo Time
  • Create a Diagram
  • Save Diagram
  • Open Textual Model
  • Edit Textual Model
  • Save Textual Model
  • Edit Diagram
  • Reorder Objects
  • Diagram With Unsaved Changes
  • Try to Edit Text
  • Other Way Around...
  • Navigation
  • Popup Editor
  • Alignment
  • grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals generate entities "http://www.xtext.org/cg2009/Entities" Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: SimpleProperty | ReferenceProperty; SimpleProperty: 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" models Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: SimpleProperty | ReferenceProperty; SimpleProperty: 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" models Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: Cover mandatory SimpleProperty | ReferenceProperty; properties in SimpleProperty: validation 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" Carefully select models Model : containment or cross {Model} (entities += Entity)*; references Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: Cover mandatory SimpleProperty | ReferenceProperty; properties in SimpleProperty: validation 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • Xtext
  • Xtext Implement a Formatter
  • Xtext Implement a Formatter Implement a FragmentProvider
  • Xtext Implement a Formatter Implement a FragmentProvider Implement a JavaValidator
  • GMF
  • GMF Initialize mandatory properties
  • GMF Initialize mandatory properties Avoid Phantom Nodes
  • Add a transaction on GMF load Initialize mandatory properties Avoid Phantom Nodes
  • Glue Code • Prevent conflicting modifications • Navigate • diagram ➜ text • text ➜ diagram (needs index) • Popup editor • Shipped as an Xtext example
  • Thanks for your attention! More information at www.itemis.de www.xtext.org koehnlein.blogspot.com