Closed daFreeMan closed 5 years ago
This is an opportunity to enhance the Find all References feature to locate all early-bound references to a given type library!
Just yesterday when I explored the new and shiny references dialog, I saw how many references I had set and thought: Would it be possible to detect if there are any early-bound members of that library? (The workaround is to remove the reference and see if the project still compiles...) :D
Awesome idea!
Which references do we want included in the search results for this? The current method in the DeclarationFinder
for identifying if a reference is "used" looks at all identifier references for the library and all uses of its declared types (i.e. Dim Foo as Worksheet
). We could easily do that, but for an enormous project, that might make for an... extensive... list of results for the host project, and probably even more for the VBA reference.
Should we use the same rule (match the "dimmed" criteria in the CE), but maybe exclude built in libraries?
I wouldn't exclude any libraries... could identifier refs be cached by typelib in [yet another] dictionary? That could simplify the code that identifies unused libraries.
I'm don't think the un-cached performance is really that bad ATM. I was mainly coming at it from the standpoint of Find all references... --> OK, here's a dialog with a couple thousand results.
Version 2.3.1.4330 OS: Microsoft Windows NT 10.0.15063.0, x64 Host Product: Microsoft Office 2016 x64 Host Version: 16.0.4711.1000 Host Executable: MSACCESS.EXE
Expand the
References
section of the Code Explorer Select any of the referenced libraries. ClickFind All References...
at the bottom of the CE Boom:The "identifier" is 'coDown', no matter which library I've selected.