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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The described editor together with its source code is freely available from https://github.com/m-toussaint/SME.
References
Benoit, F.: GEF4 tutorial. http://fbenoit.blogspot.de/2015/11/gef4-tutorial-part-3-model-tree-and.html
van Deursen, A., Klint, P., Visser, J.: Domain-specific languages: an annotated bibliography. ACM SIGPLAN Not. 35(6), 26–36 (2000)
Eclipse: GEF homepage. https://eclipse.org/gef/
Eclipse: GMP homepage. http://www.eclipse.org/modeling/gmp/
Eclipse: Sirius homepage. https://www.eclipse.org/sirius/
Hudak, P.: Modular domain specific languages and tools. In: Proceedings of International Conference on Software Reuse (ICSR), pp. 134–142. IEEE (1998)
Itemis: Xtext homepage. http://www.eclipse.org/Xtext
Itemis: Yakindu homepage. https://www.itemis.com/en/yakindu/statechart-tools/
JetBrains: Meta programming system homepage. https://www.jetbrains.com/mps/
MetaCase: Metaedit+ domain-specific modeling homepage. https://www.metacase.com
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
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
Visser, E.: Spoofax language workbench homepage. www.metaborg.org/
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
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)