Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Context goto with Format(char *, int)
Context goto with Format(char *, int) [message #29666] |
Sat, 06 November 2010 10:32  |
gprentice
Messages: 260 Registered: November 2005 Location: New Zealand
|
Experienced Member |
|
|
In examples button.cpp there is this line
label = Format("Number of button clicks %d", count);
Alt J (context goto) with the cursor on Format takes me to
String Format(Date date)
when it presumably should go to
String Format(const char *s, const Vector<Value>& v)
in format.cpp.
Does context go to resolve overloads at all or does it just pick the first one?
Graeme
|
|
|
Re: Context goto with Format(char *, int) [message #29694 is a reply to message #29666] |
Mon, 08 November 2010 20:44   |
|
If I'm not mistaken then Assist++ doesn't check function signatures. It is one of many trade-offs to achieve reasonable speed. So yes, it goes to first matching name.
In cases like this, when Alt+J doesn't do the job it is usually simpler to use Ctrl+J, type in the identifier and choose the correct function. Actually thinking of it now, it should be pretty simple to prefill the search box with the word under caret to save the typing part...
Honza
|
|
|
Re: Context goto with Format(char *, int) [message #29708 is a reply to message #29694] |
Tue, 09 November 2010 11:04  |
gprentice
Messages: 260 Registered: November 2005 Location: New Zealand
|
Experienced Member |
|
|
ok. I guess it would take a fair bit of work to resolve the overloading. It's not something you would expect in a free tool. Slickedit comes up with a dialog listing overloaded functions when you "go to" an overloaded function instead of resolving the overloading. I don't know how hard it would be for U++ to determine that the word under the cursor is a function call and list only functions with a matching name. In the case of Format, Ctrl J/Navigate doesn't narrow down the choices enough. Like you say, pre-filling the search like the find dialog does would be nice. Maybe there could be Ctrl+Shift+J command that listed only functions with a matching name in the global navigate dialog.
Graeme
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:31:02 CEST 2025
Total time taken to generate the page: 0.00524 seconds
|