Skip to main content
matt-crc
Senior III
February 19, 2025
Question

Source Format function bug?

  • February 19, 2025
  • 2 replies
  • 477 views

Hello

I setup the IDE with the code format that I wanted under project preferences. Then I right click on the source code (*.c .h or dir), then get the context menu and select "Source"->"format.  This seems to reformat the code  as expected, but shouldn't it allow me to save the file in the new format (Save button disabled)?  Not until i add a space somewhere in the file will the save button appear.  Now, if I select a directory and press source->format, do I have to manually add a space to each of the files (100s) so I can save all the files?  Is this a bug, or am i using it incorrectly?

thanks

Matthew

2 replies

TDK
Super User
February 19, 2025

If you select a directory and format all files, the files are automatically saved. If you format a single file with the Source -> Format menu option, it will need to be saved only if it is modified, else the Save option will be disabled.

"If you feel a post has answered your question, please click ""Accept as Solution""."
matt-crc
matt-crcAuthor
Senior III
February 19, 2025

Now, for some reason when I select the directory and perform Source->Format, I get an error:

mattcrc_0-1739977665844.png

BTW, do you know where the CubeIDE log is kept?

I tried it a couple of times, and same error appeared.

TDK
Super User
February 19, 2025

Reload CubeIDE and try again. Probably it is a transient error.

 

The log file is at:

<workspace_location>/.metadata/.ide.log

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
matt-crc
matt-crcAuthor
Senior III
February 19, 2025

same issue/error