XText Binding Generators from another Project [message #1796265] |
Tue, 09 October 2018 11:56 |
Mehmetcan Sinir Messages: 55 Registered: September 2018 |
Member |
|
|
When I start a new XText Project, and then generate the XText Artifacts from my XText File, A RunTimeModule is automatically created in the core logic Project where the xtext File defined, so that I can bind my own generators and validators.
Depending on my workflow, XText also automatically creates packages for generators and validation, also within this core Project.
Let's say I have another Project, where additional generators are defined, and this Project is dependent on the core Project where my RunTimeModule is.
But the core Project itself of course has no access to this second Project.
How can I bind these generators in this second Project, since in my RunTimeModule I have no access to these other generators?
To make it clearer
org.xtext.myDsl (Core Xtext Project)
---- org.xtext.myDsl
----MyDsl.xtext
----MyDslRuntimeModule.xtend
---- org.xtext.myDsl.Generator
----- org.xtext.myDsl.validation
org.xtext.second.myDsl (second Project dependent on org.xtext.msDsl)
--- org.xtext.second.myDsl.generator (I want to bind the generators here)
[Updated on: Tue, 09 October 2018 12:01] Report message to a moderator
|
|
|
Re: XText Binding Generators from another Project [message #1796266 is a reply to message #1796265] |
Tue, 09 October 2018 11:59 |
|
the generators are "found" via the
<extension point="org.eclipse.xtext.builder.participant">
<participant
class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="mydsl"/>
</extension>
extension point.
so you could do this with a custom MyDslGeneratorExecutableExtensionFactory (+ Activator + Bindings etc)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05427 seconds