3

First of all, I have seen many links on stackoverflow of integrating XText with GMF.

The most consistent tutorial I've seen so far was: http://www.eclipse.org/forums/index.php/mv/msg/472225/1036564/#msg_1036564

..But not even generate a textual editor in the final step (only GMF editor).

I also saw the documentation, but I can not understand what they suggest in this link: http://www.eclipse.org/Xtext/documentation.html#gmf_integration

So I wonder if anyone knows how to integrate effectively the GMF with Xtext with an existing ecore! Use the XText 2.0.4.

Thank you!

Joer Sakt
  • 31
  • 2

1 Answers1

1

Depending on how fixed you are on using GMF, you may want to look at Graphiti (built on GEF).

Graphiti is an Eclipse-based graphics framework that enables rapid development of state-of-the-art diagram editors for domain models. Graphiti can use EMF-based domain models very easily but can deal with any Java-based objects on the domain side as well.

There is an Eclipse Labs project for creation of Graphiti editors using an XText DSL, called Spray.

This project aims to provide one or more Domain Specific Languages (DSL) to describe Visual DSL Editors against the Graphiti runtime, and provide code generation to create the boilerplate code for realizing the implementation against the Graphiti framework. Potentially the Spray DSL can be used to generate code for other frameworks as well.

You can import your DSL ecore model into Spray, and using references to your DSL's types create a graphical editor with relatively little boilerplate. The presentation at CodeGen 2012 (SprayCodeGeneration2012.pdf on the Google Code link above) highlights some of Spray's features.

Colonel Panic
  • 929
  • 8
  • 15