Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » post processing of the inferred meta model
post processing of the inferred meta model [message #1830051] Thu, 16 July 2020 11:24 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 258
Registered: July 2009
Senior Member
Hi,

we use Xtext in our Eclipse eTrice project since 2010.
Back then (and up until today) we used the Xtend(1) based mechanism for post processing of the inferred meta model.

Later I learned how this problem is treated better and without Xtend(1) (e.g. https://dietrich-it.de/xtext/2011/07/22/customizing-xtext-metamodel-inference-using-xtend2/).

Now I'm wondering how this is supposed to be done in a clean way in a more recent version of Xtext where the org.eclipse.xtext.xtext.generator.XtextGenerator is used?

Thanks,
Henrik
Re: post processing of the inferred meta model [message #1830052 is a reply to message #1830051] Thu, 16 July 2020 11:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
the recommended method is to switch to a manually maintained metamodel

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: post processing of the inferred meta model [message #1830053 is a reply to message #1830052] Thu, 16 July 2020 11:27 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 258
Registered: July 2009
Senior Member
is there no other possibility left?
Re: post processing of the inferred meta model [message #1830065 is a reply to message #1830053] Thu, 16 July 2020 15:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
use xtend1 until the eclipse foundation forces us to drop the support
by implementing new stupid rules

or use the code in my blog


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

[Updated on: Thu, 16 July 2020 17:04]

Report message to a moderator

Re: post processing of the inferred meta model [message #1830083 is a reply to message #1830065] Fri, 17 July 2020 06:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31548
Registered: July 2009
Senior Member
Which stupid rules specifically are forcing you to drop support? Perhaps said rules could be fixed or made less stupid...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: post processing of the inferred meta model [message #1830089 is a reply to message #1830083] Fri, 17 July 2020 07:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
There is still the announcement that simrel projects need to be EPL2 and this will be enforced one day.

As Xpand. Is no longer maintained and there is not even a build job we also won't be able to address the following:
We also don't know how Xpand will survive the icu4j axe (users will have to install it somehow manually)
And if it works properly with Java 17


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: post processing of the inferred meta model [message #1830094 is a reply to message #1830089] Fri, 17 July 2020 08:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31548
Registered: July 2009
Senior Member
The train will have significant work to stay on the tracks if EPL 2.0 is enforced on day. Of the 1056 features on the 2020-09 train, 214 use SUA 1.1 and 8 use SUA 1.0. There will be a derailment should that be the case.

The continuous pruning/deprecation in the platform base is also super annoying. The general assumption is that everyone has plenty of resource of keep up with the platform's latest and greatest. It's a bad assumption.

Of course lack of any type of build process to produce new builds is not exactly anyone else's fault. As I well know, keeping builds working is non-trivial work. Everyone just assumes I'll do EMF, XSD, Oomph, and now JustJ builds for free forever. Also a bad assumption.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: post processing of the inferred meta model [message #1830108 is a reply to message #1830094] Fri, 17 July 2020 11:39 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 258
Registered: July 2009
Senior Member
A last question with respect to my initial topic: does org.eclipse.xtext.xtext.generator.XtextGenerator support metamodel post processing at all? And if yes, how does that work? I can't seem to find any hints in this newsgroup nor in the documentation or other sources.
Re: post processing of the inferred meta model [message #1830131 is a reply to message #1830108] Fri, 17 July 2020 16:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
i dont understand.
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=483209 for a workaround.
it also should work to use the xpand postprocessor similarly


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: post processing of the inferred meta model [message #1830132 is a reply to message #1830131] Fri, 17 July 2020 16:37 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 258
Registered: July 2009
Senior Member
Let me summarize what I understood:
* org.eclipse.xtext.xtext.generator.XtextGenerator (the new generator) doesn't support tweaking of the inferred meta model via post processing. One will have to go with an imported meta model.
* org.eclipse.xtext.generator.Generator (the old generator) is still available and still supports meta model post processing, either using the xtend(1) hack or using the more elegant approach from https://dietrich-it.de/xtext/2011/07/22/customizing-xtext-metamodel-inference-using-xtend2/
Re: post processing of the inferred meta model [message #1830153 is a reply to message #1830132] Sat, 18 July 2020 06:42 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
It does but you have to go tthrough loopholes

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

[Updated on: Sat, 18 July 2020 06:43]

Report message to a moderator

Previous Topic:Force relinking of XAbstractFeatureCall
Next Topic:Problems with JDK 14
Goto Forum:
  


Current Time: Sun Oct 25 22:45:53 GMT 2020

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

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

Back to the top