Author |
Topic |
|
Queequeg
Senior Member
Germany
36 Posts |
Posted - Jul 24 2014 : 11:06:18 AM
|
When I type a second ':' I get really, really bad suggestions. I don't even know where half of these come from.
What could I try to fix this? |
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jul 24 2014 : 3:22:34 PM
|
Which IDE and version of VA are you using?
Do you have:
VA Options -> Listboxes -> Get content from default Intellisense
turned On or Off?
Testing this code in VS2012 with VA 2043, I am getting the correct listbox. If you show VA Outline does the outline look correct for the file? Its possible there is something further up this file that is causing problems, and the problem is showing up here. |
zen is the art of being at one with the two'ness |
|
|
Queequeg
Senior Member
Germany
36 Posts |
Posted - Jul 25 2014 : 06:03:34 AM
|
VA_X.dll file version 10.8.2043.0 built 2014.07.10 DevEnv.exe version 10.0.40219.1 Ultimate msenv.dll version 10.0.40219.1 Comctl32.dll version 6.10.7601.17514 Windows 7 6.1 Build 7601 Service Pack 1 8 processors (x86-64, WOW64) Language info: 1252, 0x407
Intellisense is globally disabled. I disabled "Get content from default Intellisense", but it didn't help. There's still a lot of entries that have nothing to do with what's in front of the "::", probably from the namespace.
I should probably also mention that the OP is terribly incomplete. This is a huge project, and we're in a "namespace xyz {}" block here. These additional entries are all from that namespace xyz. Well, not sure about the "A" and "A_", I hope that's not from us... abs might be from std though. And this only seems to happen with that namespace. |
|
|
Queequeg
Senior Member
Germany
36 Posts |
Posted - Jul 25 2014 : 06:15:55 AM
|
For this namespace, I have to type xyz::ClassName::ClassName:: to get the correct suggestions (only members of ClassName). If I type xyz::ClassName:: I also get everything from xyz instead. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jul 25 2014 : 1:28:08 PM
|
If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over the first the namespace xyz and then the class, xyz::ClassName, is the correct information displayed? In this case, first the members of the namespace, and then the members of the class?
What is shown in the VA context and definition fields when you place the caret into "ClassName" on the line:
xyz::ClassName::
Are these problems specific to one namespace? Are they file specific? Currently this sounds a bit like our parser being confused by the scope on the current line, but its far from clear why this might be the case. |
zen is the art of being at one with the two'ness |
|
|
Queequeg
Senior Member
Germany
36 Posts |
Posted - Jul 28 2014 : 04:10:02 AM
|
Here's what I'm testing with:
namespace xyz {
void f() {
ClassName::<cursor>
}
}
The VA View displays the correct information; only members of the class when hovering over ClassName.
I just tested it, it's not specific to one namespace. We use another namespace zyx that's also in the global namespace, and members of both namespaces are being displayed in the above example. It even lists all that STL stuff like _Xlength_error, even though the file (or any include) doesn't have a using directive for std.
What works though is when I type "ClassName::<ESC>a<Backspace>" to get "the other" listbox. It's still not entirely clear to me how that works and why there's two different auto-completion lists that pretty much look the same. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jul 29 2014 : 12:02:37 AM
|
That is interesting about getting the other listbox. At a guess one is from the IDE and one is from VA, two different intellisense parsers, two different attempts at understanding this code. Can you try turning On:
VA Options -> Listboxes -> Get content from default Intellisense
and see if this helps?
To help tell the two listboxes appart you can try turning On:
VA Options -> Display -> use tomato icons in listboxes and tooltips to mark Visual Assist content
Even if this helps, it won't explain what is confusing VA, assuming VA is producing the wrong information here. |
zen is the art of being at one with the two'ness |
|
|
Queequeg
Senior Member
Germany
36 Posts |
Posted - Jul 29 2014 : 03:37:50 AM
|
Well I thought I turned off Intellisense. I have Text Editor->C++->Advanced->Disable Database set to True.
The tomato icons are being displayed in both listboxes.
Also, I just found this http://docs.wholetomato.com/default.asp?W204#defaultIntellisense "Regardless of settings, the content of listboxes after typing :: is always taken from default Intellisense. The :: may or may not follow a class or namespace." I'm not really sure how that is supposed to work with Intellisense being disabled and all. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jul 29 2014 : 1:52:51 PM
|
If the IDE intellisense is disabled then it won't produce any listboxes. If VA notices that the IDE is not producing a listbox then it will step in and try to produce a listbox of its own, but we wait to give the IDE a chance first.
If you have the time, can you try making a new, default project and copying one or two of your files into this project and seeing if you can reproduce the problem? The header file that declares the problem namespace and class might be enough. Unfortunately the short code snippets you are posting are not providing any clues as to what is going wrong here.
If you had a test project, or just a block of code that produced the problem you could show me, I can try to figure out what is going wrong here. |
zen is the art of being at one with the two'ness |
|
|
rb_
Junior Member
13 Posts |
Posted - Nov 01 2018 : 12:12:45 AM
|
Necro time!
I ran into the same problem. And, after several hours of tinkering, I figured out what the bug is and exactly how to reproduce it.
The problem occurs when there is a "using <namespace>" inside of another scope, e.g. a function (problem does not occur if using directive is at global scope).
namespace Whatever {
using namespace std; // this is the problem!
class Blorg{ void hi(); int i; };
void Blorg::hi() { this-> // initial listbox here includes std }
void Blorg:: // initial listbox here includes std
} // namespace Whatever
Hopefully this is enough information now to get it fixed! It is quite annoying. But at least now I can work around it in some cases by moving the using directive out to file scope. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Nov 02 2018 : 10:42:41 AM
|
I am seeing the same effect here. Thank you for the clear description.
case=131325
Hopefully moving the using namespace line is a reasonable solution for you. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|