Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Odd interaction with another extension

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
shippy Posted - Jan 05 2019 : 3:40:52 PM
Hello. This is mainly a fact-finding mission for me at the moment to see how I can deal with a new issue that has cropped up for me. I work in a very large codebase and another team at the company has developed a new extension that allows us to on-the-fly open up a directory of files in VS and it automatically takes care of all the paths to set up intellisense, build, debug, etc.

When I use this new extension, it does not behave well with Visual Assist. I use VA instead of the built-in IntelliSense and I see that I do not get all of my highlighting for symbols. It's like VA doesn't really 'know' about them. However, if I ctrl+click to go to the definition and it opens the header file, all symbols in that header file will now highlight in my code and intellisense for those symbols will now work. If I turn off VA then I lose all of my nice highlighting, but the normal intellisense does appear to work.

I've tried creating a custom C++ path in VA to point to a location that has my header files and always exist. I've also tried switching between using VA data or IntelliSense data in the VA options, but nothing appears to resolve the issue.

So, it appears some conflict is happening between the two or VA is relying on some intellisense data that isn't ready when it wants it (which is why ctrl+click fixes it for that VS instance), or something like that.

I would very much like to be able to continue using VA so I'm hoping I can either get some help on a workaround or maybe some detail over what the interaction could possibly be here so we can get these extensions working more harmoniously.

Thanks for any help you can provide!
9   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 14 2019 : 2:35:53 PM
I have the files, thank you. I have replied via email:

case=134911
shippy Posted - Jan 11 2019 : 3:22:09 PM
I opened up a directory and used the File->New->Project From Existing Code option to generate some solution files (since the plugin doesn't generate any projects or solutions). I'm not sure if it'll have the info you need, but hopefully so. It's the only way I know how to generate solution and project info. I will send it via the contact page.
feline Posted - Jan 11 2019 : 08:31:33 AM
I agree, this is a bit confusing.

I am going to try and pin down what "mode" you are working in, so we know which settings to look for and focus on.

Using VS2017 I have just opened a folder, NOT a solution. So I have used the menu command:

IDE File menu -> Open -> Folder...

Looking at the Solution Explorer window, the top level item in this window is the folder I have opened, and the title bar of the solution explorer window has become "Solution Explorer - Folder View".

On the toolbar at the top of the Solution Explorer window there is a pull down button called (in its tooltip) "Solutions and Folders". When I press this button there is only one enabled item in the listbox, which is the path of the folder I opened. Under this active item is a disabled line that says "No Solutions Found".

This is what opening a folder of code that does not contain a project or solution file looks like. Since there are no solutions or projects, VA cannot read any directory settings from them, so needs some help finding the standard directories that most people want us to scan and use.

In contrast, when I open a normal Visual Studio solution, via its .SLN file, the solution I have opened is the root node in the Solution Explorer window, and it says how many projects are contained in this SLN.

With a solution open the "Solutions and Folders" button lets me toggle between the folder that holds the .SLN file and the solution its self. In this situation VA uses the directories you have set in the VA Options dialog, plus the directories that are set in the SLN and project files.

I thought the missing standard library directories from you VA about information was a mistake, but I now realise this was deliberate.

Firstly, which "mode" are you working in with your plugin? Is Visual Studio working with a directory, so Solution Explorer is always in folder view mode, or is Visual Studio working with a solution and project, and thus VA is getting its directory settings from the solution and project?

The VA Open File dialog will ALSO list open files in the IDE. So, if you have the file "C:\code\random_code.txt" open in the IDE as one of your tabs, and then show the VA Open File dialog, this file will also be included in the list. So this is one possible source of files being listed.

VA's context and definition fields try to understand the #include line you are sitting on. So if your code has the line:

#include <my_library_string.h>

and the solution also contains a file with this name, we won't automatically assume that the #include file is pointing at the solution's file. It depends where the two files are, and what your include directories are set to.

Would it be possible to get a copy of a small test solution, created via your custom plugin, to test here? I could then see how the directory settings are set up, and see if I can understand what is happening? I appreciate this may well not be possible, but it's worth asking on the off chance. If this is possible, please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.
shippy Posted - Jan 09 2019 : 1:58:31 PM
I'm a little confused. I only have one directory in my stable include directory list, but it does include system header files in one of the subdirectories under the E:\os\public\amd64chk.nocil directory. The VA open file dialog knows about these files, but for some reason not the VA Context and Definition fields. I do not actually want to use the Win32 platform ones. The plugin does not appear to set anything up as a new platform that I can select in the VA options dialog. Instead the list shows up in the 'Configuration' dropdown that's on my main VS toolbar, I presume for building preferences. Since this is an 'Open folder' type of project, I cannot open up the configuration manager or any project property sheets.

EDIT: I just found this note in the VA documentation for Project Directories which may be contributing to the issue.

Visual Studio 2017
Visual Assist supports the opening of a folder of code that does not include a project or solution file. When editing such code, system symbols are those found using the directory settings of the Win32 platform defined in the most recently opened solution.

So, it sounds like either VA needs to support using my Custom settings or I need to get my folder into the Win32 platform path?
feline Posted - Jan 09 2019 : 08:43:05 AM
OK, lets start by focusing on just the #include <> lines. VA should be showing the path for the system include when you place the caret into the filename. I am not sure what Ctrl+Shift+G is doing, it depends on what command you have this mapped to. But right click and open document is an IDE command, so it has nothing to do with VA.

I think the problem here is that you only have ONE directory in your Stable Include directory list. You have not told VA where to look for the system header files.

If you go into the VA Options dialog, and go to the "C/C++ Directories" page, and set:

Platform = Win32
Show Directories for = System include files

you should see the standard include directories for your system. Can you please copy these directories and add them to your Custom include files directory list. After accepting the change and restarting the IDE, and giving VA a few moments to parse your code, this should allow VA to find the directories listed in your #include <> lines, which should help.

Are you saying that your plugin is setting up the directories it thinks you need as a separate platform, which you can select in the VA Options dialog -> C/C++ Directories page, in the platform pull down list? If so, does selecting this platform, and these directories, and then restarting your IDE help?
shippy Posted - Jan 08 2019 : 2:03:03 PM
When I put the caret into one of the symbol names, nothing shows in the VA Context and Definition fields, but I do get a tooltip that shows information about the symbol from, presumably, the header file. If I press Alt-G, it takes me to the header file. It appears to take me to the header file based on the configuration our plugin (which I can select using the Configuration dropdown on my toolbar) rather than what I've put into the VA configuration (for example, a directory named amd64chk rather than amd64chk.nocil that is specified in VA). It's kinda hard to explain.

Once that header file has been opened, when I go back to the source file, every symbol that was in that header present in my source now highlights and shows up in the VA Context and Definition fields. Once I close VS and re-open the same directory, sometimes I have to go through this process again as it appears not to persist, but other times I've not noticed this behavior.

As for my includes, it shows the paths for the ones in "" that are in the directory tree I opened. Anything outside of that (i.e. the locations are known via compilation options) will not be populated in the VA views and will not open with Alt+G. None of my external headers in the angle brackets populate, either, presumably because they are not in the directory tree. However, if I use Ctrl+Shift+G (or right-click and choose Open Document), it finds it.

Here's the VA system info:
License: XXX (1-user license) Support ends 2019.03.08
VA_X.dll file version 10.9.2302.0 built 2018.12.13
DevEnv.exe version 15.9.28307.222 Enterprise
msenv.dll version 15.0.28307.208
Comctl32.dll version 6.10.18312.1001
Windows 10 10.0 1809 Build 18312.1001
12 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Custom
Stable Includes:
E:\os\public\amd64chk.nocil;

Other Includes:

Stable Source Directories:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128\atlmfc\src\mfc;
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128\atlmfc\src\mfcm;
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128\atlmfc\src\atl;
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128\crt\src;
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\VS\src;
C:\Program Files (x86)\Windows Kits\10\Source\10.0.10240.0\ucrt;


feline Posted - Jan 08 2019 : 10:48:02 AM
OK, this all sounds reasonable and sensible, and it also sounds like it should be working, but it isn't.

I see what you mean about a large code base, 92k external headers is a rather impressive number.

Sitting in one of the cpp files that has the problem, where you are using symbols that VA does not understand, if you place the caret into one of the symbol names, what, if anything, is shown in the VA Context and Definition fields? These are normally shown at the top of the editor window, and are where the alt-m list appears. I am expecting the fields to be either blank, or to just show the file name and path, but I want to check my assumptions here.

Next, what happens if you press Alt-G on the symbol name? I am expecting nothing to happen, but you might get a message box telling you the symbol is not recognised.

Next, can you please go to the top of the cpp file and place the caret into the file names on your #include lines. I am mainly interested in the #include "" lines, since I hope that VA is able to find the files for the #include <> lines.

Is the correct path to the header files being shown in the Context and Definition fields when you place the caret into the #include "" line? What happens if you press Alt-G?

I am assuming that VA does not know where to find these include files, so it is not parsing their content. If so, VA won't know what path to show for the file, and won't be able to jump to it when you use Alt-G. If this happens, can you please locate and post the full path to one of these header files, along with your VA About information. You get this via:

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, but more importantly, it will list the directories VA should be searching.
shippy Posted - Jan 07 2019 : 2:14:41 PM
No project or solution is being generated; the IDE just points to the directory/files. When I open that dialog, I see 372 files, which are the files I expect in the directory (and the Project column has the name of the directory). The Path has the expected directory as well. If I turn off the 'Show only files in the current solution', I get almost 92k files which have the external headers I expect (which are listed as [System] in the Project column). I set the custom path in VA using the C/C++ Directories option. I list it as the only directory for 'System include files' for 'Custom' platform.
feline Posted - Jan 07 2019 : 06:47:32 AM
Do you know if a project and solution are being created here? Or is the IDE simply being opened and pointed at a directory / set of files?

If you make sure all open code files have been closed (no tabs open in the IDE) and use Alt-Shift-O to show VA's Open File dialog, how many files are listed? Are all of the files showing the same directory path? Is there anything shown in the Project column for any of these files?

How did you set the custom path in VA to point to the location of the header files? At a guess it sounds like this has not taken effect, so I am wondering how you set this up.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000