Author Topic: Argument-list completion  (Read 10659 times)

Offline kfs1

  • Multiple posting newcomer
  • *
  • Posts: 18
Argument-list completion
« on: June 17, 2007, 10:26:07 am »
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]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Argument-list completion
« Reply #1 on: June 17, 2007, 11:45:58 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: