Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Beautify Edit->Show call tip
oBFusCATed:
I've made a patch that shows a bit more info in the call tip showed by CC.
Here is the patch: http://smrt.is-a-geek.org/codeblocks/patches/cc_call_tip.patch
New features:
1. Show the return type of the function
2. Show the parents (class, namespaces)
3. Show the constness of the function
Missing features/bugs:
1. There is no info in the token if the function is static or not, so this info is missing
2. It doesn't work for constructors (it shows the info for the enclosing function :( )
Any help on these two will be appreciated :)
killerbot:
interesting, something to try out :-)
Another interesting thing : show the doxygen documentation (but then this needs to be parsed too : could start with a simple heuristic for functions : either the comment after the declaration, or the comment just in front of the declaration [when starting on a dedicated line])
--- Code: ---void foo() //!< do foo stuff
/*!
Some information on bar
@param[in] in1 : first argument
\param[out] in2 : second argument
@return returns true on success, false otherwise
*/
bool bar(int in1, float& in2);
--- End code ---
oBFusCATed:
It could be any comment, not only doxygen's comments.
But I don't think it could be done without changing the parser.
In this patch I don't do any parsing. I just read the info stored in the tokens tree.
p.s. Also I don't use doxygen comments or any other doc system :)
ollydbg:
--- Quote from: oBFusCATed on January 03, 2011, 07:31:52 pm ---I've made a patch that shows a bit more info in the call tip showed by CC.
Here is the patch: http://smrt.is-a-geek.org/codeblocks/patches/cc_call_tip.patch
New features:
1. Show the return type of the function
2. Show the parents (class, namespaces)
3. Show the constness of the function
Missing features/bugs:
1. There is no info in the token if the function is static or not, so this info is missing
2. It doesn't work for constructors (it shows the info for the enclosing function :( )
Any help on these two will be appreciated :)
--- End quote ---
nice job!!!
I will look into your patch to see if I can help.
oBFusCATed:
I've found a bug in the patch and I've fixed it.
The fix:
--- Code: ---old: result = token.m_ActualType + wxT(" ") + result + token.m_Name + token.m_Args;
new: result = token.m_Type + wxT(" ") + result + token.m_Name + token.m_Args;
--- End code ---
And the bug was:
1. if the return type is Class& the & was missing
2. if the return type is Class const & - only const was displayed
Please download the patch again...
Navigation
[0] Message Index
[#] Next page
Go to full version