Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generate templates.xml?
Generate templates.xml? [message #1852777] Fri, 03 June 2022 12:51 Go to next message
Joerg Holtmann is currently offline Joerg HoltmannFriend
Messages: 2
Registered: July 2018
Junior Member
Hi all,

Short background info on our project: We have quite a large grammar that bases on a pre-defined metamodel, where particularly the grammar currently evolves quite often. Additionally, we want to make use of the template proposal approach for the mandatory parts of the production rules. That is, the templates should propose skeletons of the metamodel elements so that only the mandatory, non-optional (according to the metamodel and thereby the grammar) attributes have already a dummy value.

This works fine with the conventional templates.xml approach, where you specify the templates manually. However, due to the fact that the grammar is large and often evolves, this would end up in a maintenance nightmare. Did anyone try to automatically generate a templates.xml based on the grammar or a metamodel, or are you aware of any examples (or point me to a different direction if I have a bad idea)? Of course, such a generated templates.xml might be quite generic and not so much customized towards the language or the users, but I think it would pay off.

Re: Generate templates.xml? [message #1852778 is a reply to message #1852777] Fri, 03 June 2022 12:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14586
Registered: July 2009
Senior Member
hi, i am not aware of somebody generating it,but maybe you also can create the templates programmatically reflecting the grammar

Twitter : @chrdietrich
Blog :
Re: Generate templates.xml? [message #1852790 is a reply to message #1852778] Fri, 03 June 2022 17:57 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7635
Registered: July 2009
Senior Member

Sounds like an interesting research project.

I suspect you need some kind of model of template intent that can be automatically aligned to the prevailing grammar.


Ed Willink
Previous Topic:Building an xtext language using gradle, in the main thread
Next Topic:JvmUnknownTypeReference for Support Class
Goto Forum:

Current Time: Tue Nov 28 23:02:09 GMT 2023

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

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

Back to the top