Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Create a custom mapping from mydsl to JVM concepts(Create a custom mapping from mydsl to JVM concepts)
Create a custom mapping from mydsl to JVM concepts [message #1220262] Tue, 10 December 2013 17:43 Go to next message
Enrico Oliva is currently offline Enrico OlivaFriend
Messages: 2
Registered: December 2013
Location: Italy
Junior Member
For the project requirement I can't use xbase but I like the mapping definition.

I have defined a dsl and I need to generate the Java code.

How can define my custom mapping to JVM Concepts?
Which is the better pattern to use?

I thought to start extending AbstractModelInferrer.


Enrico
Re: Create a custom mapping from mydsl to JVM concepts [message #1220269 is a reply to message #1220262] Tue, 10 December 2013 18:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i am not quite sure what your question is targeting. can you be a bit more specific on what you want todo?
especially why you cant use the jvmmodelinferrer as is?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Create a custom mapping from mydsl to JVM concepts [message #1220414 is a reply to message #1220262] Wed, 11 December 2013 15:31 Go to previous message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
On 10.12.13 18:48, Enrico Oliva wrote:
> For the project requirement I can't use xbase but I like the mapping
> definition.
>
> I have defined a dsl and I need to generate the Java code.
> How can define my custom mapping to JVM Concepts? Which is the better
> pattern to use?
>
> I thought to start extending AbstractModelInferrer.

Just pretend you're using Xbase, although there are no XExpressions in
your model or grammar, or other Xbase classes. Then you get your
inferrer set up as usual and can map to JvmTypes, with generated bodies
for methods etc.

Hallvard
Previous Topic:Using Xtend for template code generation without a grammar
Next Topic:Defining a customized IBuilderState
Goto Forum:
  


Current Time: Fri Apr 19 05:36:28 GMT 2024

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

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

Back to the top