Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » improving generator development turnaround times?
improving generator development turnaround times? [message #758423] Wed, 23 November 2011 09:07 Go to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Hi all,

I have some experience with the old Xtend/Xpand packanges, and I've used
Xtext 2 for newer projects. In the old projects, I was able to keep the
secondary Eclipse instance running, modify the generator templates in
the first instance and then re-run the generator from the second
instance. Since the templates were interpreted, this allowed for a very
"interactive" way of developing the generator - change something,
generate to try it and move on. Now, with Xtext 2 compiling the
templates to Java classes, this doesn't seem to work any longer. While
the generator is certainly faster, I now have to close and re-open the
secondary instance to pick up the changes. For some reason, hot code
replacement doesn't work reliably - sometimes it doesn't notice the
changes at alls and more often than not, it kills the secondary instance
because of some incompatible changes. How do you solve this problem?

Thanks
Volker


--
* Volker Wegert * http://www.volker-wegert.de/contact *
Re: improving generator development turnaround times? [message #758428 is a reply to message #758423] Wed, 23 November 2011 09:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

what about calling the generator standalone / from a workflow
=> you wont need to start a runtime

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: improving generator development turnaround times? [message #758432 is a reply to message #758428] Wed, 23 November 2011 09:34 Go to previous messageGo to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Christian,

Am 23.11.11 10:19, schrieb Christian Dietrich:
> what about calling the generator standalone / from a workflow
> => you wont need to start a runtime

....but I won't have the generated Xtext editor either, would I?

Volker


--
* Volker Wegert * http://www.volker-wegert.de/contact *
Re: improving generator development turnaround times? [message #758448 is a reply to message #758432] Wed, 23 November 2011 10:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Yes, but you re working on the generator - not the models,
never the less you can import the "model" projects in both
the host eclipse and the runtime
=> you can work on the generator in
the host eclipse, and use the editor in the runtime

or you install the edtior in the host eclipse.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: improving generator development turnaround times? [message #758449 is a reply to message #758428] Wed, 23 November 2011 10:33 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
On 23.11.11 10.19, Christian Dietrich wrote:
> Hi,
>
> what about calling the generator standalone / from a workflow
> => you wont need to start a runtime

I have been trying this, but found it difficult to make it work. I have
been able to register all the packages etc., load the relevant files
into a resource set with the reader workflow component, but the xtext
linking fails. My project uses/refers to xbase, jvmtypes, ecore and
genmodel using the importedNamespace technique, and I wonder if this
causes a problem for the workflow, e.g. if xtext indexing needs to be
triggered somehow. Are special tricks/techniques needed for making
scoping/linking work when using namespaces and references to external
models (jvmtypes, ecore and genmodel)?

Hallvard
Re: improving generator development turnaround times? [message #758461 is a reply to message #758448] Wed, 23 November 2011 11:18 Go to previous message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
I use the same trick as Volker, but noticed that it only tends to work (almost entirely reliable) when running in debug mode, although hot code replacement will still fail as soon as the generated class becomes incompatible with the previous one. This is OK when crossing the i's and dotting the t's because then you don't tend to add def's and such but it indeed is a nuisance when changing more.

Previous Topic:dsl plugin in another eclipse app
Next Topic:[xtend2] Implicit Rich String Concatenation for Code Generation
Goto Forum:
  


Current Time: Fri Apr 26 09:45:25 GMT 2024

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

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

Back to the top