Reading notes: Textual DSLs and eclipse modeling (part 2)

Part 1 of the notes is located at http://www.frankdu.com/weblog/archives/46

The relative presentation slide is located at openArchitectureWare.org.

23. In XText, you start to work with defining concret syntax.

24. For existing meta model, use importMetamodel directive. Use preventMMGeneration to prvent any meta model generation.

25. Simple Editor Customization in Xtext
– Xtend, expression language used throughout oAW
– Constraint checks: oAW check language, based on Xtend
– OutlineView customization: override label(…) and image(…) for meta types
– Content Assist
– customize the font style for keyword (keyword only)

26. Xtext instantiates Ecore metamodels, which means that it can be processed with any EMF tool.
– Within oAW workflow: the only Xtext-specific aspect is using the generated parser. Xpand template language is powerful code generation tool. Easily traverse the model/meta model using Xtend language
– EMF way: EMF’s native resource mechanism (what are the details?)
– Your own code: use the generated parser.

27. NodeUtil with generated parser
– Typically you only work with AST (ecore file)
– Help to obtain info from the parser tree: element location, element text, parser tree node at certain offset.

28. Two phases for doing your DSL:
– designing your language
– building language tools
Xtext focuses on the second phase. Except from the phases, it is also important to provide framework that run the tasks defined your DSL.

29. oAW Xtext become a part of TMF project. The first release is expected in later half 2009.

30. A Xtext parser limitation. It’s impossible to add custom action code in the parser. Sometimes it results in ugly meta models, especially with building expression languages.

This entry was posted in DSL, eclipse, java and tagged , , , , , , , , , . Bookmark the permalink.

One Response to Reading notes: Textual DSLs and eclipse modeling (part 2)

  1. Pingback: Reading notes: Textual DSLs and eclipse modeling (part 1) | People Mountains People Sea

Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.