Author Topic: feature request  (Read 4290 times)

vongodric

  • Guest
feature request
« on: August 21, 2006, 12:25:54 pm »
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

  • Guest
Re: feature request
« Reply #1 on: August 24, 2006, 09:11:19 am »
Is it possible that this will be added?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: feature request
« Reply #2 on: August 24, 2006, 09:27:37 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.
Code
/**
 * 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

vongodric

  • Guest
Re: feature request
« Reply #3 on: August 24, 2006, 12:52:29 pm »
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
/**
 * function name
 * |
 * @param ...
 * @return ...
 */

Or maybe this could be added as a plugin?