Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: cubuspl42 on August 14, 2012, 04:48:16 pm

Title: Function arguments autocompletion shortcut
Post by: cubuspl42 on August 14, 2012, 04:48:16 pm
(https://lh5.googleusercontent.com/-fK4MCqLICHY/UCovaqBwpmI/AAAAAAAAACU/eQlNjokWiaA/s788/codeblocks.jpg)
This is very easy question... I tried so many shortcuts, I tried googling it, and still nothing... How can I accept this suggestion?
Title: Re: Function arguments autocompletion shortcut
Post by: Jenna on August 14, 2012, 07:56:32 pm
It's not a suggestion, it just shows you the type of the parameter you need to call the function.

It looks like you try try to redefinite an existing function. Is that really what you want ?
Title: Re: Function arguments autocompletion shortcut
Post by: p2rkw on August 14, 2012, 08:55:29 pm
@jens: OP probably already have delcaration of function, and now he is writing implementation. In this case auto-complete of arguments (with their names) is very useful.
Title: Re: Function arguments autocompletion shortcut
Post by: Jenna on August 14, 2012, 09:27:34 pm
@jens: OP probably already have delcaration of function, and now he is writing implementation. In this case auto-complete of arguments (with their names) is very useful.

To achieve this, just right click in the appropriate cpp file, chose "Insert -> All class methods without implementation", chose which implementation-stub to generate and click okay.

Similar can be done for functions without decleration.
Title: Re: Function arguments autocompletion shortcut
Post by: cubuspl42 on August 14, 2012, 11:43:17 pm
Yes, I'm implementing previously declared method.
I guess that just autocompleting method arguments is impossible? That's bad news.  "Insert all methods without implementation" sometimes doesn't work 100% correctly for me. :/
Title: Re: Function arguments autocompletion shortcut
Post by: p2rkw on August 15, 2012, 12:41:43 am
@jens: I know this method, but I often forget about this method of inserting implementation.
BTW: I checked it right now and it works fine on rev 8164, but on my custom build of rev 8229 it doesn't work. Warning: "Can not find any file in parser's database."
Title: Re: Function arguments autocompletion shortcut
Post by: cubuspl42 on August 15, 2012, 01:20:09 pm
I have some nightly build, I'm not sure which one (I'll check it, it's on other computer) and the functionality itself works, but sometimes it shows implemented methods as unimplemented and vice versa.