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.

Best,
Joerg
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: 14285
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

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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: 7489
Registered: July 2009
Senior Member
Hi

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.

Regards

Ed Willink
Previous Topic:Building an xtext language using gradle, in the main thread
Next Topic:Xtext & Xtend Release 2.27.0 is available now
Goto Forum:
  


Current Time: Thu Jun 30 22:48:12 GMT 2022

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

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

Back to the top