News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

feature request

Started by vongodric, August 21, 2006, 12:25:54 PM

Previous topic - Next topic

vongodric

dunno if this is the right topic, but I have a small request: If I type: /** and press enter then sceleton of the documentation be automatically generated. Als in doc comment if a enter a new line (press enter) then automatically * would be added. Both eclipse ide and Zend Studio (for php) have this and I find it very nice feature. So it would be nice to have in C::B

vongodric

Is it possible that this will be added?

MortenMacFly

Quote from: vongodric on August 24, 2006, 09:11:19 AM
Is it possible that this will be added?
It isn't as easy as you may think. Keep in mind that C::B supports a wide range of compilers and languages. Only for C++ (and a few others) this makes sense. But not in general. So one would need to know if the current editor's file belongs e.g. to a C++ project and then trigger this "autocompletion".
Anyway: To have an abstract comment (as e.g. the header of a file) you can use abbreviations:
- go to settings - editor - abbreviations
- add an abbreviation, e.g. head
- in the code window just write the abtract header you would like to have, e.g.

/**
* Author:  MortenMacFly
* Version:
*/

- click ok
- open a file in the editor and type head
- press CTRL+J to do the abbreviation. done.

BTW: If you put a pipe-symbol ("|") just after "Version: " the cursor would be at this point after the abbreviation.

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

vongodric

yes it's a nice feature but not what I wanted.

But I don't think it's as hard as you make it to seem. basically if "enter" is pressed, you do 2 checks, if it's c/c++ document and then, if current style is comment_doc. If yes, add indentation, add * and one space too.

later it would be cool if I type: /** then c::b would check for what follows. if it's a function then add smth like:
Code (cpp) Select
/**
* function name
* |
* @param ...
* @return ...
*/


Or maybe this could be added as a plugin?