Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Degradation in and problems with COM programming
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Jul 07 2016 :  11:40:06 AM  Show Profile  Reply with Quote
I've recently moved to a newer Version of VisualAssist. (also, a new computer, so some c omplaints might be an option I haven't found yet.)


Autotext in .idl files is not working (I'm pretty convinced at some point in time it did). Worst problem for me is lacking the uuid -> IDL UUID Expansion.


.tlh and .tli files getting parsed, even though they are excluded.
These are generated by VisualStudio proprietary #import statement and contain rather boring wrappers. Due to how #import works, our Solutions typically contain one or two dozen identical tli's, with These records clogging up "find reference" and "go to declaration" lists.

I have set .tlh and .tli to be excluded ("Projects and Files", "Extensions to ignore"), but this does not help, even after clear + rebuild symbols + restart IDE.


----

Feature requests.

I remember that you have stated before that .idl files are not supported. I would like to ask you to reconsider this statement with at least minimal support.

The following issues appear most lacking:

"Go to definition" for an interface does not include the .idl definition

(Together with the first issue mentioned: you are listing more than a screenful of interface definitions in the various .tlh files I don't care about, but not the actual definition)


Find Reference

Find Reference for an interface has some issues. It does find references in the current and other .idl files, and *sometimes* even in .cpp/.h files.

However, it does seem to miss most of the latter. This might be cause by us using #import with a rename_namspace clause, generatign the declaration in another napespace.

(Another issue is #import generating an ISomeInterfacePtr wrapper - but that's OK, I can findref for that specific Symbol)

Where VA could be really helpful is finding the places where a particular interface is implemented. Maybe by filtering the results of find reference.

This is complicated by the CRTP used in ATL, e.g.

class CCoClassImpl : public IDispatchImpl<ISomeInterface, ...>, ...


---

That's it already. Yeah!

Birds eye view: Navigation between declaration and implementation of a COM interface within one solution is a real pain, together with some seemingly minor issues mentioned above, the smooth navigation provided by VA turns into a grotesque grimace of itself when .idl files are involved.


-----


Technical Info:

VS2008 (yeah, sorry, soon-to-be-upgraded)
License: trial
VA_X.dll file version 10.9.2102.0 built 2016.06.02
DevEnv.exe version 9.0.30729.1 Professional
msenv.dll version 9.0.30729.1
Font: Courier New 13 (pixels)
Comctl32.dll version 6.10.10586.0
Windows 8 6.2 Build 9200
12 processors (x86-64, WOW64)
Language info: 1252, 0x407

Platform: Win32
Stable Includes:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include;
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;

Other Includes:

Stable Source Directories:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfcm;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src\atl;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\crt\src;


feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 08 2016 :  12:44:52 AM  Show Profile  Reply with Quote
Firstly snippets in IDL files, is VA active in the IDL files? Are you seeing VA's context and definition fields at the top of the editor window?

If so, can you please try turning On the option:

VA Options -> Suggestions -> Enable in C#

and see if this fixes the snippets? This fixes them for me. Slightly random, but IDL files obviously require somewhat special handling.


For the .tlh and .tli files, is a code edit possible? If I were to suggest some form of trick with an IDE macro to hide the #import statements from VA, would this be possible for you? Or is this sort of code edit not going to be an option? I am not sure how to do this yet, but I think it may be possible.

zen is the art of being at one with the two'ness
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Jul 08 2016 :  08:16:44 AM  Show Profile  Reply with Quote
"Enable in C#" does the trick for snippets! Nice!

quote:
For the .tlh and .tli files, is a code edit possible? If I were to suggest some form of trick with an IDE macro to hide the #import statements from VA


Would be OK, since most #import statements are centralized.


Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 08 2016 :  8:35:25 PM  Show Profile  Reply with Quote
THank you for the update, I am glad the setting change worked for you. To ignore the imported files, can you try this:

#ifdef VA_HELPER_CODE
#define FILE_TO_IMPORT_ONE ""
#else
#define FILE_TO_IMPORT_ONE "include_only.h"
#endif

#include FILE_TO_IMPORT_ONE

it is a bit ugly, but this is hiding the header file, and its contents from VA for me, testing VS2008 and VA 2102. So long as the .tlh and .tli files are not part of the solution its self, after a symbol database rebuild this should hide these files, and their content, from VA.

zen is the art of being at one with the two'ness
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Jul 27 2016 :  05:11:13 AM  Show Profile  Reply with Quote
Got around to try it, it's not working :(

I tried both the variant you suggested:

#ifdef VA_HELPER_CODE
#define FILE_TO_IMPORT_ ""
#else
#define FILE_TO_IMPORT_ "KlAutomation.tlb" rename_namespace("nsKlScr")
#endif

#import FILE_TO_IMPORT_



and a different variant that might work the same:

#ifndef VA_HELPER_CODE

#import "KlAutomation.tlb" rename_namespace("nsKlScr")
#import "KlAutomationRegistration.tlb" rename_namespace("nsKlScr")

#endif // VA_HELPER_CODE


For each variant, I chose VAssistX options, Performance / "Clear" and "Rebuild", exited the (only) instance of visual studio, waited for it to vanish from task manager and restarted it.

Find References still looks like this:



And yes, it's Put/GetDeviceAutoSelection all the way down to the end of the list, and all of them occur in a .tlh or .tli

It seems to be one for each configuration of each project in the solution
(It's just 14 projects in the solution, but it's typically 4..8 configs each)


---

Note: After starting VAX, I do see it still does parse the .tlh and .tli files (flying by in the status bar), even though they are also excluded in the options:



Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jul 28 2016 :  08:25:17 AM  Show Profile  Reply with Quote
1. I don't see .tlb added to the "Extensions to ignore" list on the second screenshot. Do I miss something?
2. I think that the #ifdef solution should work. I am looking into it.
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Jul 28 2016 :  10:20:51 AM  Show Profile  Reply with Quote
I've added the .tlb (+ clear + rebuild), but no change.

the .tlb is a binary, "compiled" type library, created from .idl. #import <something.tlb> generates a something.tlh and a something.tli and threats them as if they were #included at the place of the #import.

I do see that VAX parses the .tlh's and .tli's generated, independent of the "exclude" setting.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 28 2016 :  9:30:07 PM  Show Profile  Reply with Quote
I am having problems setting up a test case here. I have found a couple of .tlh, .tli file pairs to test with, but when trying to #import them into VS2008 I just get compiler errors, and no new symbols ever appear in VA's Find Symbols dialog.

I have found a test .dll file that I can #import with VS2008, and the simple project compiles. Even with the #import statement commented out, and a symbol database rebuild done, the symbol is still being listed. When I hover the mouse over this symbol, the tooltip tells me that it is coming from a .tli file in the %TEMP% directory.

Can you please check the tooltip on some of these entries, and see which file they are coming from?

Would it be possible to get a copy of one of your .tlh, .tli file pairs, purely for testing purposes? I just want something I can successfully import, to see if I can get VA to ignore it reliably. I realise getting files is often not possible, but its worth asking on the off chance.

If this was 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.

zen is the art of being at one with the two'ness
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Jul 29 2016 :  04:09:49 AM  Show Profile  Reply with Quote
I'll try setting up a test project (maybe will not get around to that today...)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 29 2016 :  1:09:05 PM  Show Profile  Reply with Quote
If you have the time to set up a test project, this would be very helpful. I did get the trick with the #define working here, but that was testing with including a .h file. Obviously things work slightly differently with importing these files, but since I did get something working, I am hoping I can find a workaround for you.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000