Skip to main content

Enriching Textual Xtext-DSLs with a Graphical GEF-Based Editor

  • Conference paper
  • First Online:
Book cover Perspectives of System Informatics (PSI 2017)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10742))

Abstract

Xtext is a widely accepted framework to develop domain-specific languages (DSLs). However, these DSLs are bound to be purely textual, what is appropriate in many but not all cases. Sometimes, one wishes to have another concrete syntax for a DSL. For example, a model should be represented only by graphical elements (i.e., a purely graphical syntax) or by a mixture of graphical elements and textual annotations (i.e., a hybrid syntax).

In this paper, we describe an approach for developing a graphical editor for a hybrid concrete syntax of a given DSL. The starting point is an Xtext grammar of a DSL, together with all the usual accompanying features such as validators and code generators. We describe the necessary steps to enrich the existing toolset with a graphical editor based on the GEF framework.

Our approach is highly flexible since large parts of the editor can be implemented and tailored manually to accommodate the underlying DSL. Nevertheless, the effort to create such an editor is manageable, since the GEF framework offers most of the necessary features for graphical editing. We describe what conditions must be met with regards to the underlying language designed with Xtext and how a corresponding graphical GEF-based editor for a hybrid syntax can be implemented.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The described editor together with its source code is freely available from https://github.com/m-toussaint/SME.

References

  1. Benoit, F.: GEF4 tutorial. http://fbenoit.blogspot.de/2015/11/gef4-tutorial-part-3-model-tree-and.html

  2. van Deursen, A., Klint, P., Visser, J.: Domain-specific languages: an annotated bibliography. ACM SIGPLAN Not. 35(6), 26–36 (2000)

    Article  Google Scholar 

  3. Eclipse: GEF homepage. https://eclipse.org/gef/

  4. Eclipse: GMP homepage. http://www.eclipse.org/modeling/gmp/

  5. Eclipse: Sirius homepage. https://www.eclipse.org/sirius/

  6. Hudak, P.: Modular domain specific languages and tools. In: Proceedings of International Conference on Software Reuse (ICSR), pp. 134–142. IEEE (1998)

    Google Scholar 

  7. Itemis: Xtext homepage. http://www.eclipse.org/Xtext

  8. Itemis: Yakindu homepage. https://www.itemis.com/en/yakindu/statechart-tools/

  9. JetBrains: Meta programming system homepage. https://www.jetbrains.com/mps/

  10. MetaCase: Metaedit+ domain-specific modeling homepage. https://www.metacase.com

  11. van Rest, O., Wachsmuth, G., Steel, J.R.H., Süß, J.G., Visser, E.: Robust real-time synchronization between textual and graphical editors. In: Duddy, K., Kappel, G. (eds.) ICMT 2013. LNCS, vol. 7909, pp. 92–107. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38883-5_11

    Chapter  Google Scholar 

  12. Seehusen, F., Stølen, K.: An evaluation of the graphical modeling framework (GMF) based on the development of the CORAS tool. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 152–166. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21732-6_11

    Chapter  Google Scholar 

  13. Visser, E.: Spoofax language workbench homepage. www.metaborg.org/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Thomas Baar .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Toussaint, M., Baar, T. (2018). Enriching Textual Xtext-DSLs with a Graphical GEF-Based Editor. In: Petrenko, A., Voronkov, A. (eds) Perspectives of System Informatics. PSI 2017. Lecture Notes in Computer Science(), vol 10742. Springer, Cham. https://doi.org/10.1007/978-3-319-74313-4_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-74313-4_29

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-74312-7

  • Online ISBN: 978-3-319-74313-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics