Separate cache directories per platform in the Uses Clause Manager in GExperts

 Delphi, GExperts  Comments Off on Separate cache directories per platform in the Uses Clause Manager in GExperts
Aug 082021
 

The Uses Clause Manager in GExperts has an “Identifier” tab that can be used instead of the Find Unit refactoring of the Delphi IDE (which for me doesn’t work most of the time and if it does is very slow). And of course the Uses Clause Manager also works for older Delphi versions which simply didn’t have this refactoring.

For this to work it parses all source files in the various search paths of the project. And because this takes a while it caches the results and only updates this cache if a new unit is found or a unit has been changed.

Until recently this parser was assuming that the current project is a Win32 application and set the conditional defines accordingly. Later I chanted the conditional defines depending on the currently selected platform but this caused a problem: Units parsed for different platforms ended up in the same cache so it was possible that the lookup was showing wrong results or at least the “Open Unit” button placed the cursor on the wrong line.

Today I changed this to use separate cache directories for each platform, so this problem should no longer occur.

There is not yet a GExperts release containing this change. If you want to use it, you will have to compile your own DLL which is much easier than you might think.

btw: Did yo know that Stefan Glienke has published a similar tool called Delphi Uses Helper? Mine of course is better and much faster. 😉
(Actually it depends on your computer and the project size. On my computer for large projects both tools are about on par, but mine is more flexible. Stefan thinks otherwise. But check it out yourself.)

If you want to comment on this blog post, you can do so in the corresponding topic in the international Delphi Praxis forum.

 Posted by on 2021-08-08 at 10:00

Separate lists for VCL and FMX in GExperts Rename Components expert

 Delphi, GExperts  Comments Off on Separate lists for VCL and FMX in GExperts Rename Components expert
Aug 072021
 

The Rename Components expert in GExperts now has separate lists for the names and additional properties for VCL and FMX components. Previously it was a hassle to have additional properties shown in the rename dialog if these have different names in VCL vs. FMX e.g. the Caption vs. Text property of TLabel. Now you simply configure them differently.

This is the configuration for a VCL label:

And this for an FMX label:

Now the expert checks which designer the current project is using and selects the proper list for it.

So, for a VCL label the rename dialog looks like this:

While for a FMX label, it looks like this:

There is not yet a GExperts release containing this change. If you want to use it, you will have to compile your own DLL which is much easier than you might think.

If you want to comment on this blog post, you can do so in the corresponding topic in the international Delphi Praxis forum.

 Posted by on 2021-08-07 at 15:24