Open yuecelm opened 8 years ago
Here are the patches for the cpp generator: StatemachineHeader.patch.txt StatemachineImplementation.patch.txt
dont forget to add org.eclipse.cdt.core in Require-Bundle in MANIFEST.MF
@yuecelm Thanks you very much for your contribution, applying the CDT formatter to the generated code is a nice idea!
The problem is, that we don't have a dependency to Eclipse CDT right now in the code generators. Currently, it is possible to generate code without CDT installed, what is really useful if you run in a headless environment for example.
A solution could be to introduce an optional dependency and the formatter is only applied when available. We will schedule this issue for the next release.
I wrote some code in order to apply the code formatter from my default project "SW core dev" on the generated code. Ideally it should take instead of the hardcoded project the targetProject value from sgen file. Maybe it would be an interesting feature for other users too...