rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

code Inspection does not see anything in the project. #6182

Closed stewart-anderson closed 11 months ago

stewart-anderson commented 12 months ago

Hi,

Just trying out RD and I know my code will be littered with unused variables etc.

when I open the code inspections, RD doesn't seem to find anything to inspect.

image

Probably me, but I assumed, I'd just select the Code Inspections from the current module

retailcoder commented 12 months ago

Hi, thanks for the feedback! Rubberduck does not process code files every time you bring up a toolwindow; instead, it parses the project and keeps its own internal representation of the code in memory, making the data available to all features at once. You can trigger a parse of your project by clicking the "Refresh" link in the Code Inspections or Code Explorer toolwindows; they will be empty until a parse happens. You can also trigger a reparse/refresh by clicking the "refresh" button (circle arrows) on any Rubberduck toolwindow, or the one on the Rubberduck command bar (the button has a caption that should say "ready"), or using the Ctrl+` hotkey (you can configure hotkeys in the settings dialog). It's important that Rubberduck's internal representation of the code 100% exactly matches what's in the editor whenever Rubberduck needs to make changes to the code; that's why a lot of commands are disabled when a module was modified since the previous parse/refresh; whenever Rubberduck makes a modification, it will automatically reprocess the affected modules, but the VBE does not tell us about changes occurring in the editor, so refreshing has to be a manual operation (this will change in v3 though). Hope it helps, don't hesitate to ask any questions you might have about anything Rubberduck!

Greedquest commented 12 months ago

Isn't the default for refresh ctrl + ' not `