CodeInsight for the Uses Clause in RAD Studio 10.4 Sydney

June 23rd, 2020 Posted by Embarcadero No Comment yet

With the new, LSP-based CodeInsight in RAD Studio 10.4 Sydney, CodeInsight in the Uses clause is much more useful.

It’ll let you search for all the standard VCL/FMX/RTL units, as well as any unused units in your project. Combined with the new searching where it matches entries containing what you’ve typed, not just those starting with what you’ve typed, and I find myself using it a lot more.

However, what about all your own units, and 3rd party ones, that you use but don’t add into your project? How do you get it to show them?

I assumed it would be driven by my Project Search path, but even after I added in the path to the folder that contained my units, it still wouldn’t show up.

Well, turns out that I was adding the wrong path. Instead of the folder with my pas files, I should have been adding the path to my dcu files. That’s what the LSP implementation is looking for at the moment.

I’ve already logged a request to extend this to pas files (go vote for it if you’d like to see this), but in the meantime, just add the path to your dcu files into the Project Search path and CodeInsight will happily show you all your favourite units.

Tags: ,

No comments yet. You should be kind and add one!

Leave a Reply