Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Combining JvmModelInferrer with IGenerator
Combining JvmModelInferrer with IGenerator [message #928656] Sun, 30 September 2012 17:32 Go to next message
Eclipse UserFriend
Hello,

my question is, how you would combine the "old" IGenerator approach with the new JvmModelInferrer approach?

I did it with a bad hack already, but I would like to know the official way to do it.

Use case:
I model web pages, generate JSF controller classes and would like also to generate XML descriptors.

Thank you!
Re: Combining JvmModelInferrer with IGenerator [message #929013 is a reply to message #928656] Mon, 01 October 2012 02:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi the inferred model is already used by the jvmmodelgenerator which
is an igenerator

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Combining JvmModelInferrer with IGenerator [message #935232 is a reply to message #929013] Sat, 06 October 2012 16:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello Christian,


so you mean, I have to override the "generate" method and call the second generator manually before or after the super() call?
In this case I will have also to take care myself of the injections within the second generator. Is it really the official way to do this
or I just miss something?

Thank you!


Best Regards,
Boris
Re: Combining JvmModelInferrer with IGenerator [message #935254 is a reply to message #935232] Sat, 06 October 2012 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i dont get your problem. subclass the jvmmodelgenerator. override org.eclipse.xtext.xbase.compiler.JvmModelGenerator.doGenerate(Resource, IFileSystemAccess)
or dispatch into org.eclipse.xtext.xbase.compiler.JvmModelGenerator.internalDoGenerate(EObject, IFileSystemAccess)
and simply bind it.

thats all. there is nothing special. so "official way" since it is trivial that none even thinks of one

and why take care of injections? there is nothing different to other injections

~Christian
Re: Combining JvmModelInferrer with IGenerator [message #944166 is a reply to message #928656] Sun, 14 October 2012 18:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello Christian,


I get your point. It's indeed very easy. Smile

A tiny problem, I still have, is the

@SuppressWarnings("restriction")


I forced to add. Actually, there are many places where I need this thing. Every time I do it, I think, there must be some other way to do, what I'm trying to do.

What do you think about restrictions? (and about restrictions in the special case?)

Thank you!


Regards,
Boris
Re: Combining JvmModelInferrer with IGenerator [message #944886 is a reply to message #944166] Mon, 15 October 2012 02:33 Go to previous message
Eclipse UserFriend
Hi it is just that the Xtext guys can/may change the api

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:a DSL for type systems/checkers for xtext languages
Next Topic:Where is the recursive rule?
Goto Forum:
  


Current Time: Sat Jul 05 06:32:50 EDT 2025

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

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

Back to the top