Author Topic: feature request  (Read 3022 times)

Offline vongodric

  • Multiple posting newcomer
  • *
  • Posts: 15
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

Offline vongodric

  • Multiple posting newcomer
  • *
  • Posts: 15
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: 9493
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: [Select]
/**
 * 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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline vongodric

  • Multiple posting newcomer
  • *
  • Posts: 15
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: C++
  1. /**
  2.  * function name
  3.  * |
  4.  * @param ...
  5.  * @return ...
  6.  */

Or maybe this could be added as a plugin?