Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Generate templates.xml?
Generate templates.xml? [message #1852777] Fri, 03 June 2022 08:51 Go to next message
Eclipse UserFriend
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 08:59 Go to previous messageGo to next message
Eclipse UserFriend
hi, i am not aware of somebody generating it,but maybe you also can create the templates programmatically reflecting the grammar
Re: Generate templates.xml? [message #1852790 is a reply to message #1852778] Fri, 03 June 2022 13:57 Go to previous message
Eclipse UserFriend
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:JvmUnknownTypeReference for Support Class
Goto Forum:
  


Current Time: Fri May 16 11:49:36 EDT 2025

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

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

Back to the top