Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: accosmin on August 15, 2007, 09:34:54 am

Title: AStyle plugin - how to format all source files in the project?
Post by: accosmin on August 15, 2007, 09:34:54 am
Hello,

I am using Code::Blocks for a while and I enjoy building my toy applications for Linux and Windows.

Recently, I changed some editor's options and now I want to format all my source files accordingly using the AStyle plugin.
The problem is I cannot find a button or some command to do this, it seems only the current file can be formatted.

Is there any quick solution to format all my source files in the project?
Besides open every single file and using the Plugins menu entry ... :(

Thanks
Title: Re: AStyle plugin - how to format all source files in the project?
Post by: dje on August 15, 2007, 09:49:39 am
Hi !

It could be a nice improvement. :)
Maybe you could try to use astyle (http://astyle.sourceforge.net/) from the command line with a *.cpp *.h to list your project files ?

Dje
Title: Re: AStyle plugin - how to format all source files in the project?
Post by: accosmin on August 15, 2007, 10:14:00 am
Thanks for the link.

I tried the astyle command line; it works with *.h and *.cpp, but I cannot use the settings from Code::Blocks.
It seems that astyle needs some astylerc file with all the formatting settings and CB produces no such file.

Cosmin
Title: Re: AStyle plugin - how to format all source files in the project?
Post by: Ceniza on August 15, 2007, 06:02:22 pm
Please file a feature request at Berlios and feel free to assign it to me, so I won't forget :)