Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Active Annotation Concept in a XBase and JvmModel based DSL(How can I implement a concept similar to Xtend's Active Annotations in a Xtext DSL?)
Active Annotation Concept in a XBase and JvmModel based DSL [message #1759957] Thu, 20 April 2017 13:51 Go to next message
Thomas Kohler is currently offline Thomas KohlerFriend
Messages: 15
Registered: November 2016
Junior Member
I wrote a DSL similar to Xtend (but for more domain specific structures). The DSL-to-Java-Generator was built by using the JvmModelInferrer as usual. The generated Java classes depend on a core framework which is supplied by an additional plugin beside the Xtext based plugins for the language itself.

The next step I try is to implement a way to customize the generator-process of the language like Xtend does it with Active Annotations. This would allow the users to use a own core framework by supplying the corresponding generator logic for it without changing the code written in the DSL itself.

The difficulty is the separation between the DSL-Language which should be delivered as a plugin for Eclipse itself and the needed Generator code (like the implementation of an active annotation for Xtend) which should be written as a project in the (target) Eclipse platform which runs the DSL plugin.

Can you give me a hint how this could be done? Especially how a plugin which is running in an Eclipse instance can access / use code which is written using this Eclipse instance...

Thank you,
Re: Active Annotation Concept in a XBase and JvmModel based DSL [message #1759958 is a reply to message #1759957] Thu, 20 April 2017 13:54 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14497
Registered: July 2009
Senior Member
i think you should do this 1:1 as xtend does it. have a look at org.eclipse.xtend.core.macro.ProcessorInstanceForJvmTypeProvider.getProcessorInstance(JvmType)

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Reduce available JvmTypes
Next Topic:Multiple versions of a grammar in parallel
Goto Forum:

Current Time: Thu Jun 08 11:12:56 GMT 2023

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

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

Back to the top