News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Argument-list completion

Started by kfs1, June 17, 2007, 10:26:07 AM

Previous topic - Next topic

kfs1

When writing a declaration, definition or call to a function CB has knowledge of, it pops up a handy tool tip. It'd be really nice if you could "complete" that argument list. Right now the list dissapears as soon as you start filling in the parameters.


Use case 1:

Prototype: int function(Foo* foo, Bar* bar, const Wolf* wolf, const Goat* goat, const Cabbage* cabbage, time_t now);

You are defining function, you type

int function(

and the tooltip appears, a keypress drops the arg list in for you.

Use case 2:

You've defined function as above, and want to add a prototype for it. Again, once you type the ( CB shows a tool tip. A single keypress completes the prototype for you.

Use case 3:

You want to call function(foo, bar, now); when you type the ( up comes the tooltip. You hit complete and now all you need to do is delete the casts.

[Maybe you could make it so that shift+complete only inserts the parameter names]


MortenMacFly

Quote from: kfs1 on June 17, 2007, 10:26:07 AM
It'd be really nice if you could "complete" that argument list.
You an C::B let create the prototype for you. To do so: Define the function in the header (for example), goto the source file, right-click, choose "Insert" -> "All class methods without implementation". A list will popup with all methods you haven't implemented so far. Choose the one(s) whose prototype you need and let C::B do the rest.
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]