Category
GExperts is one of the oldest and probably the most well-known plug-in for the Delphi IDE. I've been using it since the early versions and still use it in Delphi 12 today. Some of its features have been incorporated into the IDE itself over the years but it continues to evolve and be a useful productivity aid.
In case you don't know what GExperts is, the website describes it as "a free set of tools built to increase the productivity of Delphi and C++Builder programmers by adding several features to the IDE." I agree and would go on to say it has so many features that there must be something beneficial for everyone!
Here is a list, in no particular order, of how I personally have used GExperts to improve my productivity over the last 20+ years. And yes, I have used every one of the features listed below at one time or another; and no, this is NOT all the features!
Code Proofreader
When working in early versions of Delphi (e.g. 5 and 7, 2007), the Code Proofreader not only helped keep identifiers cased consistently but can also save lots of time correcting typos with its AutoCorrect list. How many times have you typed ;=
when you intended to type :=
? Or "ned
" when you meant "end
"? GExperts will fix that for you on-the-fly.
But you can expand that idea to use it as a macro replacement, somewhat like a simplified version of today's Live Templates in Delphi. For example, I've added "ef
" as an auto-correct with its replacement value set to ":= False;
" and "et
" with a replacement value of ":= True;
". This speeds up initializing Boolean variables significantly. I've added several other similar macros for other common code snippets.
Code Librarian
If you find yourself writing a bunch of programs that use similar techniques, such as accessing a plug-in architecture or an obtuse interface or even just a common SQL statement, and it requires writing similar code over and over, you might find yourself opening old programs or saving snippets of code in a text file you keep close by. But what if that code could be organized in a hierarchical list and built into Delphi, accessed with a few clicks and pasted right in your code with a hotkey? Well, GExperts does just that with its Code Librarian feature. What's more, this is shown in a floating window that can be moved to a second monitor for even more convenience and has several sample snippets to jump-start your collection. It has keyword search and color syntax highlighting. Once you find your code snippet, just click Ctrl+Shift+V
to insert that block of code right into the Delphi editor.
ASCII Chart
Have you ever needed to look up the ASCII number for a character? With GExperts installed, simply select ASCII Chart from its menu and you'll instantly have a handy reference to all 256 characters, plus you can select what font and size to see them with.
Backup Project
Even with source control projects in place, I occasionally use the Backup Project feature of GExperts. Usually, this is for copying the project and all the units it uses to a temporary folder or to zip up for some reason, like to send to a friend. This feature saves time by collecting all the units referenced in the DPR of the Delphi project, allowing you to modify the list of files, then creating a .zip file of your choice with the files at the click of a button. That's easier than manually selecting the files in Windows Explorer, isn't it?
Editor Experts
There are several features that are only active while working in the code editor. They use configurable shortcut key combinations that, once learned, add several convenient tricks. Here are three of them:
Expert: Insert Date/Time
One company I worked for required all changes to code to be marked with a commented date accompanied by a "doc header" section at the top of the unit with that date and a comment about what ticket this resolved. It got tedious manually typing something like { 03/15/24 }
at the end of every line you where you made changes that day but with GExperts configured to use the date format I need, this became as simple as hitting my configured shortcut key combination, Ctrl+Alt+A
!
Expert: Reverse Statement
Have you ever typed up several statements to write configuration settings to an .INI file, then had to retype a bunch more similar ones to read the same settings? Perhaps you've copied, then pasted one set, then manually switched the assignments around. With GExperts, you can save a lot of copy/move/paste operations. Just select the pasted second set of statements and hit Shift+Alt+R
(or your assigned shortcut keys) and all those assignment statements are switched around for you. Of course, you'll have to rename the Read
statements to Write
statements but select the block and use Find/Replace (or better yet, switch to Sync Edit Mode
in modern versions of Delphi) to do that.
Expert: Comment/Uncomment
Before Delphi had the comment/uncomment hotkey, GExperts provided this feature, albeit not quite as smart. Instead of a toggle, there was one shortcut to comment (Ctrl+Alt+.
) and another to uncomment (Ctrl+Alt+,
). It doesn't detect whether or not the lines are already commented, still, this is another nifty time saver when you're in the code in an old version of Delphi.
Replace Components
There have been numerous times when I've wanted to replace one component or set of components with another. Like when changing all buttons on a form to TBitBtn
in order to add button icons. You can always manually edit the DFM file and use Find/Replace from one component type to another then acknowledge the changed properties and correct the source's reference when saving the unit but there's a much easier way: select Replace Components from the GExperts menu while one of the button components is selected, select the new component type in the drop-down list of the pop-up window, check the desired Scope (such as "All components on the current form"), then watch as GExperts makes the change for you in a flash!
Components To Code
Most of the time, a component can be simply placed on a form or data module and you can let the framework manage the creation and destruction of the component for you, also allowing you to set properties conveniently at design-time. There have been several instances where I've started down that path, then realized I need to create the component in code, either because I was converting a data module to a component and didn't want to worry about form resources; or when I needed to make multiple copies of the component dynamically.
Setting up all the properties at design time is simple, but can be tedious to do it with code when there are a lot of properties. Here again, GExperts can simplify your life; just select the component you've set up on the form or data module, select Components to Code from the GExperts menu, and it will put all the Delphi statements to create the code on the Clipboard so you can then paste the lines into your code wherever you need.
To Do List
I'm pretty sure that many features of GExperts have inspired features now a standard part of Delphi--and I'm pretty sure that the To Do List is one of those. It's an ingenious but simple idea that if a curly-braced comment is started with TODO:
, a list can be generated from comments in all the current source files to provide you a centralized view of tasks. This is another feature with a floating window, and this one can be docked or moved to a second monitor. It functions nearly identical to Delphi's TODO list in modern versions of the IDE.
Message Dialog Wizard
Have you ever added a MessageDlg
statement in your code and then at runtime realized it didn't look quite right or you inadvertently switched the Caption
with the Title
? With GExperts Message Dialog wizard, not only can you build your message dialog statement visually but you can also preview it before a line of code is written! But wait there's more--you can also switch to using MessageBox
instead or opt to embed the whole thing in an IF
or CASE
statement that checks its result! How convenient is that?
Set Tab Order
If you have several controls on a form and add and/or rearrange them over time without setting their tab order, running the program at runtime can be frustrating for a user who tries to navigate among them using the Tab key. Paying attention to the tab order of the various components can increase usability significantly. While new versions of Delphi have a feature to reset the ordering for you, the one in GExperts has more features--and has been around a very long time.
Configuration
There are some parts of GExperts that don't write code or provide real-time functionality but simply improve Delphi's IDE in subtle ways. Here are a couple of areas I'd like to point out.
Config: Component Palette
If you use an early version of Delphi and have lots of components on your horizontally positioned component palette, it can be difficult to find the right tab for the component set you're looking for because you have to slowly scroll through the component tabs until you find the right one. GExperts provides an option to add tabs on multiple lines so you can see all the component tabs at once. Of course, this takes more vertical space so you have to adjust (and save) the editor layout but this is a huge convenience when working with forms and data modules in old versions of Delphi with lots of third-party components installed. If you don't like multi-line component tabs, GExperts has another option to add a pop-up window with all the tabs listed (and alphabetically, if you like); no more component tab scrolling! (This feature is not needed in newer versions of Delphi and was removed from GExperts.)
Config: IDE
GExperts has grown and added features over the years to accommodate new capabilities of Delphi. The IDE tab of the Configuration is one area that has changed a lot; some of the new options are simple niceties, like "Enhance IDE dialogs" that lets you resize and save the position of some of the fixed dialogs.
Others can save lots of time, like one I've recently discovered, "Enhance Build Events dialog with Favorites". This is a huge time-saver for me because I use Build Events a lot and often copy them from project to project. Before finding this feature, I would often close the current project, open an old project that used the build event I needed, go into Project Properties > Build Events and copy the command, then close and reopen the project I was working on and go back into Build Events to paste the command. Now, if I think I'll ever use a Build Event command again, I can just add it to my Favorites list and then select it later when I'm working on a different project, saving me many steps. This has become another of my new favorite productivity boosters!
Look through these options and the other Configuration tabs--you may find some features I have not mentioned that work to solve a tedious task for you!
Copy Your Configurations
Let's say you've added several Code Librarian snippets, added several Dictionary Words to the Code Proofreader, and maybe created a few entries in Favorite Files (another feature of GExperts but not mentioned here), and now you are upgrading Delphi or using a different version of Delphi to work on another project and you want all your GExperts settings you've taken time to customize. The settings for GExperts have had very few changes over the years and are (mostly) compatible with each other (and when the format changes, there's usually an automatic conversion). This means you could copy the configuration files GExperts uses from one installation to another in order to keep your settings.
These configuration files are not a secret. Just look in GExperts Configuration; in old versions, go to the File Locations tab for the directories; in newer versions, go to the General tab and the folders will be shown in the File Locations group box. These folders can be changed if you need; in fact, you may experiment with putting them on a network or synchronized folder.
Closing & Acknowledgements
There are many more features of GExperts not mentioned here, like the Class Browser, Clipboard History, PE Information, Component Grid, and especially several Editor Experts I have not taken the time to learn. Look through the menus, read the documentation, and use the capabilities that you find most useful. There may be some tricks you had not thought of that simplify your coding experience in surprising ways. Some features have been removed from GExperts over the years as the IDE has changed and no longer supports functionality in the same way; others have identical functionality in the IDE so I no longer use the GExperts version of that feature. Still, I use old versions of Delphi enough, and there are still enough productivity gems for the most recent version of Delphi, that this plug-in is still the most valuable Delphi plug-in for me.
I would like to thank Thomas Müller for continuing the support of GExperts after the original programmer, Erik Berry, stopped supporting the project a few years ago. It's an open-source project and you can contribute suggestions and ask questions on Delphi PRAXiS forum dedicated to this product.
See the Webinar
Finally, there was a webinar on GExperts by Jim McKeeth of GDK Software that demonstrated many of these features--and a few others I have not used. They will be presenting other popular Delphi plug-ins in the near future, so be sure and visit their "webinars page" to learn more.
Totally Agree.
Absolutely concur. It is always the first Plug-In I install..
Add new comment