Author |
Topic |
|
Kirinyale
New Member
Ukraine
4 Posts |
Posted - Dec 22 2022 : 04:49:12 AM
|
One small thing which bugs me for years is that whenever I type #include <string> (or any other extensionless STL header), Visual Assist (native Intellisense is disabled in Visual Studio) is happy to quickly replace it with #include <string.h>, which is NOT what I wanted, and I have to fix it every single time.
I see two problems with that:
1) Suggestion selection algorithm for some reason either does not see the <string> header, or doesn't prefer the exact match.
2) My Visual Assist settings for "Enhanced Listboxes" are clearly and explicitly configured to commit selections with Tab and Enter, no "additional characters". And I even cleared the characters list in native Intellisense options, just in case. Why is this setting stubbornly ignored for #include, of all things?
I would really love someone to come around and finally fix this, or at least provide clearer / easier to find settings. |
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 23 2022 : 07:24:13 AM
|
At a guess, since so far I cannot reproduce this problem, the fact that the "string" entry isn't in the listbox is probably the root problem here.
Can you please go to:
VA Options -> System Info -> Copy Info
and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup. More importantly it will show me your VA stable include directories. Since these are used when locating these STL header files, they may be important. |
zen is the art of being at one with the two'ness |
|
|
Kirinyale
New Member
Ukraine
4 Posts |
Posted - Dec 23 2022 : 07:43:59 AM
|
Hello! I've just double-checked, and <string> header is indeed in the listbox, right before <string.h> which is still auto-selected by default. The only difference is that <string> has a different icon (probably not recognizer as a proper header?).
Details from "copy info" below:
License: Named Network User / Standard (JDFK-GTNTHD-LWVUA8-3BND) Support ends 2023.07.31 VA_X.dll file version 10.9.2463.0 built 2022.10.25 DevEnv.exe version 16.11.32929.386 Professional msenv.dll version 16.0.32413.511 Comctl32.dll version 6.10.19041.1110 Windows 10 10.0 21H2 Build 19044.2251 16 processors (x86-64, WOW64) Language info: 1252, 0x409
Platform: Project defined Stable Includes: C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt; C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt; C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared; C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\VS\UnitTest\include; C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\VS\include; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\atlmfc\include; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\include;
Other Includes:
Stable Source Directories: C:\Program Files (x86)\Windows Kits\10\Source\10.0.17763.0\ucrt; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\VS\src; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\crt\src; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\atlmfc\src\atl; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\atlmfc\src\mfcm; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\atlmfc\src\mfc; |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 23 2022 : 10:08:27 AM
|
How are you closing / accepting the listbox?
If you make sure that "string" rather than "string.h" is the highlighted item in the listbox before closing / accepting the listbox, what gets entered into the file?
I am seeing the different icon here as well. Icons are normally assigned based on the file extension, so files without an extension present a bit of a challenge here. |
zen is the art of being at one with the two'ness |
|
|
Kirinyale
New Member
Ukraine
4 Posts |
Posted - Dec 23 2022 : 10:15:57 AM
|
As I wrote in the original post, I am simply typing the full line quickly: #include <string> As soon as I hit the closing angle-bracket (>), the listbox gets autoconfirmed to whatever it decided to default to (sometimes it is even something else containing the word "string", but that only seems to happen if VA haven't finished indexing yet). If I do pause to switch manually to what I want, it works as expected. However, as I also wrote, my VA settings are configured to only confirm listboxes by Enter or Tab, not by the closing bracket. For some reason, in this specific case, the setting is disregarded. |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 23 2022 : 11:05:54 AM
|
I asked since you may have been using the default VA Snippets, which trigger on #in, and insert either
#include ""
or
#include <>
with the caret placed to start typing the include name, and the listbox should also appear before you start typing the file name. In this situation there is no need to type the > since it has already been inserted.
So you are typing all of this manually without the use of snippets? I automatically use the snippets by default, so this is what I am expecting, simply because it is what I do |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 23 2022 : 11:22:17 AM
|
There is a known bug that the #include listboxes are working a bit differently to other listboxes, and unfortunately this means that they are not respecting the characters to complete the listbox with settings, which is why you are seeing this problem:
case=148033 |
zen is the art of being at one with the two'ness |
|
|
Kirinyale
New Member
Ukraine
4 Posts |
Posted - Dec 23 2022 : 12:11:37 PM
|
Well, it's good to hear that an ages-old bug is known, but the whole point of my post is that sometimes someon needs to just fix such things :) |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 23 2022 : 1:22:35 PM
|
We are working on fixing bugs with every release. Strange as it probably sounds, this isn't a bug that many of our users seem to have encountered. If I had to guess, I would say that using snippets helps them avoid it, but that's just a guess. Still, we do prioritise bugs that are effecting more users.
One possible work around, that might help, is using VA's Add Include command:
https://docs.wholetomato.com/default.asp?W177 |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|