cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX uses spaces in .cproject; STM32CubeIDE uses Tabs

DSwea.1
Associate III

When TouchGFX generates code to a project's .cproject, it uses spaces. When STM32CubeIDE saves to .cproject, spaces are replaced by Tabs. This causes Git (SourceTree) to label every line in an otherwise identical project file as changed. The actions of the two environments need to be coordinated such that both use the same whitespace characters (preferably spaces).

2 REPLIES 2
Piranha
Chief II

C'mon, STM32CubeIDE (Eclipse) is an IDE and should be capable of dealing with both.

https://stackoverflow.com/questions/407929/how-do-i-change-eclipse-to-use-spaces-instead-of-tabs

DSwea.1
Associate III

Thanks for the suggestion. I'm aware that Eclipse can be configured to use spaces, and I've been setting my code style preferences for C/C++, Java, xml, etc. for many years to use spaces (in both Eclipse proper, and in a number of manufacturer IDEs based on Eclipse). However, in STM32CubeIDE, the .cproject file (an XML file), the IDE does not apply Tabs vs Spaces settings when saving the .cproject file. Indeed, an XML editor is not installed in the IDE by default. I don't care if it's tabs or spaces---I'm simply asking that ST coordinate its tools so that one need not deal with this issue.