Hi,
I work with code that contains many constants defined in various namespaces and enums. If I use the identifer scoped only by namespace, no tooltip is displayed, e.g.
void myFunction(diCat::nodeType pNodeType)
{
if (pNodeType == diCat::FILE_NODE) // <-- no tooltip appears when hover on FILE_NODE
{
LOG_ERROR("not supported")
}
}
If the code is changed to have either the full namespace/enum or just the constant name then a proper tooltip is displayed. i.e. either of these cause the tooltip to be shown:-
if (pNodeType == diCat::NodeTypesEnum::FILE_NODE) // <--- tooltip displayed if (pNodeType == FILE_NODE) // <--- tooltip displayed
Tested on build 11562 (Feb2019).
Andy
Diff:
Diff:
Can you show uas a minimal test code which can reproduce this bug?
So that we can test it.
Thanks.
Hopefully this is ok.. Hover over each literal name in the main code and for the first two you get the tooltip showing the enum details and value. But for UNEXPECTED_ERROR which is only qualified by namespace, you don't get any popup.
Regards
Andy
Andy,
Can you check to see if your code works with the latest nightly aa my test on Windows 10 with SVN 12468 (local build) worked okay and the tooltip after typing "if (a == literals::" showed the three enum options.
The latest nightly can be downloaded from the following CB form thread:
https://forums.codeblocks.org/index.php/topic,24545.0.html
Thanks,
Andrew
Hi thanks for the update.
I checked the nightlies page but only saw 12462 (20 June) so I tried that one.
Agree that if you type out "if (a == literals::" then at that point you do get a tooltip showing the available values of the enum.
However my issue was when you click or hover on a piece of code like
"if (a == literals::UNEXPECTED_ERROR)"
then no tooltip appears at all.
The tool tip does appear if the code you are looking at has fully qualify the constant with its namespace and enum, or you don't qualify it at all. But when it has been qualified by just the namespace, hovering does not popup a tooltip..
Thanks
Andy