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
Class wizard and indendation bug
-
- CodeLite Enthusiast
- Posts: 19
- Joined: Fri Dec 07, 2012 8:20 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- 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
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
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
-
- 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
I think I'm blind. How can I acces code-formatter settings and how can I invoke code-formatter for the file?eranif wrote: Format the file after code generation using the code-formatter settings (which usually matches to the user preferences)
Eran
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).
- 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
Plugins -> Source code formatter -> Options
Ctrl-I will format the current file
Eran
Ctrl-I will format the current file
Eran
Make sure you have read the HOW TO POST thread