|
|
|
|
Re: How to use text generators and JvmInferrer in one project ? [message #1739832 is a reply to message #1739831] |
Thu, 04 August 2016 20:00   |
Eclipse User |
|
|
|
Christian Dietrich wrote on Thu, 04 August 2016 15:35(1) org.eclipse.xtext.xbase.compiler.JvmModelGenerator.doGenerate(Resource, IFileSystemAccess)
Ho do I get the IJvmDeclaredTypeAcceptor object to use the comfort of JvmInferrer ?
Can I inject it via the injection framework ?
The constructor takes a DerivedStateAwareResource. How can I get this ?
How can I bind the acceptor to the given IFileSystemAccess ?
Quote:
(2) cause eclipse people compain if api changes. thus the api is is restricted. if you can live with having to adapt your impl in a future version of xtext that is ok isnt it?
Thats Ok, although I would prefere a stable API for using JvmInferrer and TextGenerator together in one project.
I think projects usually consist of java and text files so it is a common use case to generate both types from one project, isn't it.
|
|
|
Re: How to use text generators and JvmInferrer in one project ? [message #1739848 is a reply to message #1739832] |
Fri, 05 August 2016 04:00  |
Eclipse User |
|
|
|
You don't. These are completely different things running at different phases.
If you want to infer classes with the jvmdeclaredtypeacceptor then do it in the inferrer
If you want to generate pure text do it in the generator.
Maybe you can elaborate on your usecase. What kind of Java classes do you want to generate without inferrer but using jv,declaredtypeacceptor
|
|
|
Powered by
FUDForum. Page generated in 0.03773 seconds