itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
175 stars 86 forks source link

Hook into "Build Project" #1472

Open BeckmaR opened 7 years ago

BeckmaR commented 7 years ago

If this is possible at all, it would be a nice feature for C/C++ statecharts to hook into Eclipse / CDTs "Build project". At the time being, in the worst case, one needs to generate the statechart(s), the test(s), and then build the project. It's only a few clicks but it actually adds up. It would be so much nicer if SCT would just listen to "Build Project", execute all sgens and then let Eclipse compile the C-Code.

andreasmuelder commented 7 years ago

This should work. The builder builds all sgen files. Maybe our Builder is executed after the CDT Builder and this is the problem. Can you check this?

BeckmaR commented 7 years ago

Nope, using CDT's "Build project" doesn't generate anything at all, neither before nor after the compilation.

Example project

covfefe.zip

  1. Import project
  2. Build project, should work as expected
  3. Delete "src-gen"
  4. Build project again, nothing gets generated. Sad.
BeckmaR commented 5 years ago

So I dug around and found two / three issues:

This is all of course not an issue in smaller projects where "Build automatically" is active and we generate on every save. But bigger projects where the user deactivates this and instead builds on demand, or if the statechart was changed via git and not manually regenerated, we might come too late in the process.