Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Combine Xtext editor with GEF editor
Combine Xtext editor with GEF editor [message #1451193] Thu, 23 October 2014 13:13 Go to next message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hello,

I would like to implement a GEF editor that operates on a Xtext resource where this resource can also be edited with the Xtext editor.

On the internet I found some helpful bits and pieces, but what I am looking for is an example for such an integration, which uses plain GEF and not GMF.

Does such example exist and is it available for me to look at?

Thanks
Jan R.
Re: Combine Xtext editor with GEF editor [message #1461173 is a reply to message #1451193] Tue, 04 November 2014 09:26 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
While that's possible to some degree, I strongly advocate to go for a graphical view (without model editing) solution. The reasons are manifold, you might want to have a look at multiple presentations I had on that topic, e.g.
http://www.slideshare.net/schwurbel/xtext-diagrams-and-ux
http://www.slideshare.net/schwurbel/a-fresh-look-at-graphical-editing-12183802
or
http://www.slideshare.net/schwurbel/graphical-views-for-xtext
In any case, you should choose synchronization points of the editors wisely (which is impossible from my point of view).

The last slide deck contains three important rules with code examples on what you have to know from the Xtext side:
1) Use IXtextDocument tranactions
2) Never store direct references to EObjects (use URIs instead)
3) Use Xtext helper classes to access the EObject at a certain text position.

Into the bargain, you might want to have a look at two frameworks I've built for creating graphical views on Xtext models, namely the GEF-based
Generic Graph View https://github.com/JanKoehnlein/Generic-Graph-View
and the more modern JavaFX-based
FXDiagram https://github.com/JanKoehnlein/FXDiagram



---
Get professional support from the Xtext committers at www.typefox.io
Re: Combine Xtext editor with GEF editor [message #1805792 is a reply to message #1461173] Wed, 24 April 2019 06:48 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
Further information about combining Xtext and GEF is available under:
- blog post: Eclipse GEF DOT Graphical Views on Xtext DSLs
- recorded talk on the EclipseCon Europe 2018: Eclipse GEF DOT Graphviz Authoring Environment in Eclipse
Re: Combine Xtext editor with GEF editor [message #1806649 is a reply to message #1805792] Mon, 13 May 2019 09:27 Go to previous message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
Further information about combining Xtext and GEF is available under:
- blog post: Eclipse GEF DOT Graphical Views on Xtext DSLs
- recorded talk on the EclipseCon Europe 2018: Eclipse GEF DOT Graphviz Authoring Environment in Eclipse
- paper work: Enriching Textual Xtext-DSLs with a Graphical GEF-Based Editor
Previous Topic:How to change the directory of the generated metamodel ?
Next Topic:How to add cascading content assist in xtext
Goto Forum:
  


Current Time: Thu Apr 25 12:47:24 GMT 2024

Powered by FUDForum. Page generated in 0.02989 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top