Open BeckmaR opened 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?
Nope, using CDT's "Build project" doesn't generate anything at all, neither before nor after the compilation.
So I dug around and found two / three issues:
ProgressMonitor
. This means that the current build will always execute fully before our build job is run, because scheduling puts it at the end of the queue. Instead we should just generate if we are called from the BuildManager
. See PR #2618.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.
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.