Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

Code SnippetDelphiDemoFiremonkeyIDELiveBindingsShowcaseUtilityWindows

Cloud Based Unit Resolver For The Delphi RTL In Delphi 10.2 Tokyo

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

I put together a small Delphi FireMonkey project called UnitResolver which allows you to enter a class, function, or procedure name and then does a search via Google Custom Search to see if it can predict what Unit that class/function/procedure is in so that you can add it to the Uses clause of your current Unit. The Delphi IDE has a built in function that does this to a certain extent if you select some text and press CTRL-SHIFT-A but for the most part I have never found it to give very good results. In the UnitResolver project I have Google Custom Search set up so that it only searches (you can try this yourself in the regular Google search by adding to the end of your search). I have the Google Custom Search results piped through a PHP page on so keep my Google API key secure. I used the REST Debugger to automatically consume the JSON from Google Custom Search and load it into a TFDMemTable automatically. Lastly, I use the Levenshtein distance algorithm (which is a fuzzy matching solution) to try and predict which of the results is closest to the correct unit. Feel free to test it out and see how well it does finding units for classes, functions, and procedures in the Delphi RTL.

Download the full source code for the UnitResolver project for Delphi 10.2 Tokyo.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply