improving generator development turnaround times? [message #758423] |
Wed, 23 November 2011 04:07  |
Eclipse User |
|
|
|
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 #758449 is a reply to message #758428] |
Wed, 23 November 2011 05:33   |
Eclipse User |
|
|
|
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 06:18  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.07195 seconds