2018-03-26 08:29 PM
exp:
void function(void) {
int cubemode;
}
void function(void) {
int iexpect;
}
#indent2019-01-18 12:17 AM
I hope it will be done one day
2019-06-15 08:00 AM
Replace '#t' by '#t#t' all file in "Program Files \STMicroelectronics\STM32Cube\STM32CubeMX\db\templates"
2019-06-20 01:51 AM
we can see in these files:
[#if nTab==2]#t#t[#else]#t[/#if]
Could it be possible to define nTab somewhere?
2019-07-03 07:33 PM
This may be a simpler way. I‘ll try.
2019-07-17 07:19 AM
I used a PowerShell command for this:
(With Administrator privileges) here C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates>
Get-ChildItem *.ftl -Recurse | ForEach { (Get-Content $_ | ForEach { $_ -replace 'nTab=1', 'nTab=2' }) | Set-Content $_ }
Seems to work
2019-08-02 08:18 AM
I decide patch jar file, function cleanCode in CodeEngine.class,
while ((line = inFtl.readLine()) != null) {
String result = line.toString().replace("#n", "\r\n").replace("#t", " ");
writer.write(result + "\r\n");
}
modify constant u8 from two space to four, then repack it back to STM32CubeMX.jar
but some ftl file (usbd_cdc_if_c.ftl) ident is hard coded as two space instead #t so nTab hack takes no effect.
2019-11-01 02:51 AM
This hasn't been addressed yet, or has it?
2019-11-14 02:51 AM
Could you explain how you did this?
2020-04-01 08:12 AM
Same question here. Would be a really tiny work for ST to finally implement this and would save us hours of "redesigning" the code every time again, when creating a new project.