Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error in 15 Minute Tutorial Extended?
Error in 15 Minute Tutorial Extended? [message #1819131] Wed, 08 January 2020 14:47 Go to next message
Lars J. is currently offline Lars J.Friend
Messages: 11
Registered: September 2009
Junior Member
Hello,

I am currently learning xtext and try to apply the steps outlined in the 15 minute tutorial Extended to write a code generator in xtend (which I also do not know yet).

For this I created a small grammar and generated all language artifacts.

My problem is a simple one:

The extended tutorial states that an xtend class has been generated which is to be used for further implementation. But this isn't the case. In the generated IDE plugin I found a generator skeleton but it is in Java not in xtend. The interesting fact is that this java class has been generated into the xtend-gen directory which hints at the fact that an xtend class should have been the result.

Is there some specific configuration needed to change this? Am I missing something?

I am using XText version 2.20.0.v20191202-1256 in the Eclipse DSL Tools version 2019-09 R (4.13.0)

thanks in advance

Lars
Re: Error in 15 Minute Tutorial Extended? [message #1819132 is a reply to message #1819131] Wed, 08 January 2020 14:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi, i have no idea but the error you describe makes no sense to me-

this makes no sense. can you share your sample code e.g. on github?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error in 15 Minute Tutorial Extended? [message #1819133 is a reply to message #1819132] Wed, 08 January 2020 15:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
PS did you try to simply rerun the workflow

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error in 15 Minute Tutorial Extended? [message #1819134 is a reply to message #1819132] Wed, 08 January 2020 15:04 Go to previous messageGo to next message
Lars J. is currently offline Lars J.Friend
Messages: 11
Registered: September 2009
Junior Member
Hi, thanks for your very quick reply.

actually I've just written a small grammar which I think shouldn't be necessary to be put on github.....so I've attached a screenshot.

There you can see you can see that in the project com.siemens.simgen in folder xtend-gen there is a file SimGenGenerator.java. If I understand the 15 Minute Extended Tutorial correctly it should be SimGenGenerator.xtend.

It says:
"First of all, locate the file DomainmodelGenerator.xtend in the package org.example.domainmodel.generator. This Xtend class is used to generate code for your models in the standalone scenario and in the interactive Eclipse environment."

(names need to be replaced....)

index.php/fa/37113/0/


regards
Lars
  • Attachment: shot.jpg
    (Size: 75.13KB, Downloaded 153 times)
Re: Error in 15 Minute Tutorial Extended? [message #1819135 is a reply to message #1819134] Wed, 08 January 2020 15:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the generator is in the simgen.generator package. simply klick the arrow >

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error in 15 Minute Tutorial Extended? [message #1819136 is a reply to message #1819135] Wed, 08 January 2020 15:10 Go to previous message
Lars J. is currently offline Lars J.Friend
Messages: 11
Registered: September 2009
Junior Member
thans for clearing my view! :-)

regards
Lars
Previous Topic:Decision Node not work I want to use decision node with Moka
Next Topic:How to Serialize Strings with line breaks?
Goto Forum:
  


Current Time: Wed Apr 24 18:13:18 GMT 2024

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

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

Back to the top