Class wizard and indendation bug

General questions regarding the usage of CodeLite
netrick
CodeLite Enthusiast
Posts: 19
Joined: Fri Dec 07, 2012 8:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Class wizard and indendation bug

Post by netrick »

When you create a class using wizard and set namespace through it, the code is generated without namespace indendation. However when inside class body you type public/private/protected, it is intendended and adds one level of indendation for the code you will write below it. This is annoying because I must manually remove that extra indendation.

2 ways to fix it:
1) let class wizard automatically adds intendation for class inside namespace
2) give a setting to disable indendation for namespace
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Class wizard and indendation bug

Post by eranif »

Actually, my prefered way of fixing this:
Format the file after code generation using the code-formatter settings (which usually matches to the user preferences)

My suggestion is to indent it automatically (similar to what 'Add function implementation' et al do)

Eran
Make sure you have read the HOW TO POST thread
netrick
CodeLite Enthusiast
Posts: 19
Joined: Fri Dec 07, 2012 8:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Class wizard and indendation bug

Post by netrick »

eranif wrote: Format the file after code generation using the code-formatter settings (which usually matches to the user preferences)
Eran
I think I'm blind. How can I acces code-formatter settings and how can I invoke code-formatter for the file?

Also, I agree that the true fix in next version should be to add indendation to the plugin (because everything but this plugin adds indendation).
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Class wizard and indendation bug

Post by eranif »

Plugins -> Source code formatter -> Options

Ctrl-I will format the current file

Eran
Make sure you have read the HOW TO POST thread
Post Reply