Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » code gen when Build Automatically disabled(code gen occurs on clean when Build Automatically is disabled)
code gen when Build Automatically disabled [message #1789925] Thu, 31 May 2018 20:54 Go to next message
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 155
Registered: July 2009
Senior Member
I'm looking at the tracing/ code generation example,
https://github.com/theia-ide/tracing_codegen

I noticed the Project->Clean... does clean, but it also initiates a new code generation, even if Project->Build Automatically is unchecked.

Conversely, if I manually delete the generated source files, then select Project-> Build All, the code does not get generated.

Seems like it would make more sense for the code generation to be linked to Build, and that Project->Clean would delete any generated files and leave them gone.

Was there some reason for the current design? I'm not familiar with other code generation apps, so I'm not aware of what is customary.
===========

My mistake. I just noticed that the "Clean" dialogue has a Start a build immediately checkbox, which I suppose overrides the workspace Build Automatically being unchecked. I can see why this dialog would be necessary if the Eclipse workspace isn't there, as when using e4 rcp, so this makes sense to me.

[Updated on: Thu, 31 May 2018 21:12]

Report message to a moderator

Re: code gen when Build Automatically disabled [message #1789933 is a reply to message #1789925] Thu, 31 May 2018 22:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12239
Registered: July 2009
Senior Member
If you have build automatically off the clean dialog willl ask you if you want a build after the clean.

That all is standard eclipse behaviour and not Xtext specific


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: code gen when Build Automatically disabled [message #1789946 is a reply to message #1789933] Fri, 01 June 2018 06:50 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 614
Registered: July 2009
Location: Dortmund, Germany
Senior Member

And if you delete generated files and you do a Build All, they are not produced, since the source files did not change. The builder only considers the source files.
Previous Topic:runtime version of generated model
Next Topic:Xtext scope
Goto Forum:
  


Current Time: Mon Sep 24 18:18:09 GMT 2018

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

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

Back to the top