GExperts 1.3.15 experimental twm 2019-11-23 released

 Delphi, GExperts  Comments Off on GExperts 1.3.15 experimental twm 2019-11-23 released
Nov 232019
 

I just released GExperts 1.3.15 for all supported Delphi versions.

There have again been various bug fixes and the following notable changes:

  • There is now a start menu entry for a new stand alone version of the GExperts Code Formatter. Note that it not only has a GUI for selecting a single file to format and show the settings dialog, but can also be called with a list of files to be formatted. So, you could for example drag a group of files onto the executable to format them all. I plan to expand that command line interface in the future to allow formatting all files in a project or in a directory and its subdirectories.
  • Talking about the code formatter: Many more bugs have been fixed. A while ago I was actually thinking I got them all, but unfortunately that turned out to be a delusion. 😉
  • The GoTo Line Number dialog enhancer has been removed and replaced with a Go To expert with the same functionality but its own dialog, which has a setting to replace the Search -> Go to Line Number menu entry. If you have any suggestions on further improving that expert, please file a feature request.
  • Bugfix for the PE Information expert: It should now display all exported class names.
  • Many changes to the Uses Clause Manager expert (most of them contributed by Peter Panettone)
    • Bugfixes for the Identifier tab. It wrongly found some identifiers that just weren’t exported from that unit
    • It now highlights any units it will add.
    • It can now parse map files generated by the Win64 compiler, not just those from the Win32 compiler
    • It now shows an error message if it cannot use the map file and resorts to the dpr file.
    • The filter on the Identfier tab now has two modes:
      • Match anywhere
      • Match at start
    • There is now a status bar that shows the full file name of the currently selected unit. A popup menu allows to
      • Copy that file name to the clipboard
      • Copy that file to the clipboard (like pressing Ctrl+C on the file name in the Windows File Explorer)
      • Open the file’s location in the Windows File Explorer
    • The library path for Delphi XE and later was wrong, so the VCL/RTL tab was always empty.
  • There was a bug with the Clipboard History expert: It still hooked the clipboard even if it was disabled. In addition it could kill the IDE when it added new entries to the (possibly invisible) list view. Under some strange conditions setting the text of a memo apparently can fail with an EInvalidOperation exception. This exception was not caught and since it happened deep inside a chain of event handlers, it caused an Access Violation somewhere which then silently killed the IDE. That one was quite difficult to track down.
  • Improvement to the Backup Project expert: A new dialog shows any files it cannot find and it only shows each file once, not every time it does not find it. This was particularly annoying with include files.
  • And last, but not least: The GExperts version for Delphi 10.3 is now compiled with the latest and greatest Delphi 10.3 update 3 release. Let’s hope this fixed some bugs and hasn’t introduced any new ones. (Unfortunately RSP-25645 “Creating sub components with IOTAFormEditor.CreateComponent raises access violation” still hasn’t been fixed, so replacing e.g. TTable with TSqlTable still does not work.)

The new version is available for download on the GExperts download page.

 Posted by on 2019-11-23 at 19:09

No new GExperts release yet for Delphi 10.3.3

 Delphi, GExperts  Comments Off on No new GExperts release yet for Delphi 10.3.3
Nov 212019
 

Edit: There is now a new release.

Before you ask: No, there is no new GExperts release yet for Delphi 10.3.3. I haven’t even downloaded it yet. I might get to it this weekend.

In the meantime you can get the sources and compile your own DLL with the new Delphi version. I don’t expect any problems (but I have been wrong before).

 Posted by on 2019-11-21 at 18:13

If you compiled your own GExperts clear the Uses Clause Manager cache

 Delphi, GExperts  Comments Off on If you compiled your own GExperts clear the Uses Clause Manager cache
Nov 192019
 

This is only relevant, if you have recently compiled your own GExperts DLL and you use the Uses Clause Manager’s Identifier tab:

There were several bugs in the unit parsing code that have been fixed. But you won’t see the effect, because the buggy results from before that have been cached. In order to get the benefit of these bugfixes, you must clear the Uses Clause Manager’s cache.

To do that,

  1. Go to GExperts -> Configuration
  2. On the Experts tab, enter “uses” and press Alt+C
  3. Press the “Clear Cache” button

Yes, I know, that I should make a new release soon, but I keep finding old and sometimes new bugs and then there are people who submit patches. It’s difficult to determine when to make a release. But hey, you have got the source code and the compiler, so why not compile your own DLL?

 Posted by on 2019-11-19 at 17:48

Several bugs regarding the GExperts Uses Clause Manager fixed

 Delphi, GExperts  Comments Off on Several bugs regarding the GExperts Uses Clause Manager fixed
Oct 192019
 

A few months ago I added the “Identifiers” tab to the GExperts Uses Clause Manager. It allows you to search for a unit that exports a given identifier. It works a bit like the “Find Unit” refactoring in the IDE since Delphi 2005.

That feature starts a background thread that parses all units in the search path to get a list of identifiers these units export. It works well with Delphi 2007 but recently I discovered that in Delphi 10.3.2 it finds “FreeAndNil” in various units which I am sure don’t export it:

So something must have been wrong with the parsing code.

It turned out that there were several bugs in that code, all related to language features added to Delphi later than Delphi 2007 (You may remember that I stated several times that I still do most of my work with Delphi 2007 so that version is the one with which GExperts has been tested extensively.).

These bugs have now been fixed and “FreeAndNil” only gets me the expected short list of units:

The changes have been committed to the svn repository (revisions #2807 and #2808), so if you want a DLL without this bug, you can compile your own.

 Posted by on 2019-10-19 at 20:20

All but one known GExperts code formatter bugs fixed

 Delphi, GExperts  Comments Off on All but one known GExperts code formatter bugs fixed
Oct 182019
 

Some long standing bugs in the GExperts code formatter have been fixed.

It’s great to see nearly all unit tests finally succeed.

About 10 new test cases have been added too, so the improvement is significant.

The fixed bugs including some that have bugged (sorry 😉 ) me for years, e.g.:

  Msg := Format('%s %s'#13#10
    + '%s',
    [a, b
      c]);

where the last line used to be indented the same as the previous line like this:

  Msg := Format('%s %s'#13#10
    + '%s',
    [a, b
    c]);

There is one left:

begin
  { testcomment
}s := '';
end;

where I am not even sure how it should be formatted. Maybe like this:

begin
   { testcomment
   }s := '';
end;

Or maybe it shouldn’t be changed at all.

Anyway, I’m thinking about making another GExperts release this weekend, but haven’t decided yet. If you want a fixed code formatter, you will have to compile your own DLL which isn’t rocket science after all.

 Posted by on 2019-10-18 at 13:55

Yahoo is closing down Groups

 Delphi, GExperts  Comments Off on Yahoo is closing down Groups
Oct 182019
 

I just read that Yahoo will be closing down Groups and will delete all content there.

By the end of October no new content will be accepted, by mid December all content will be deleted.

Why am I posting this? The GExperts mailing lists are hosted at Yahoo Groups, so they will be gone shortly. If you want to stay up to date or communicate with other GExperts users, there is either this blog (there is a GExperts RSS feedWhat is an RSS feed?), or the GExperts sub forum on the international Delphi Praxis forum.

Since Groups was the only remaining Yahoo feature I was using, have also just deleted my Yahoo account.

 Posted by on 2019-10-18 at 10:44

GExperts 1.3.14 experimental twm 2019-09-08 released

 Delphi, GExperts  Comments Off on GExperts 1.3.14 experimental twm 2019-09-08 released
Sep 082019
 

I just released GExperts 1.3.14 for all supported Delphi versions.

Apart from the bug fixes to the source code formatter there are the following changes:

  • Export and Import entries for the Tools menu (blog post)
  • Copy and paste for Delphi Tool menu entries (blog post)
  • The Uses Clause Manager builds its list of identifiers in the background so it should now take less than a second to display the identifier list.
  • Since Delphi XE3 and later no longer allow creating components with subcomponents (the OTAPI function for that crashes – bug report here), GExperts no longer supports these components in the Replace Components expert.
  • The Delphi Tool Properties dialog now gets resized so the list of macros can be displayed without scrolling.
  • Added incremental search to Code Proofreader dictionary
  • Keep StringGrid selection visible when focusing other controls in the Rename Components configuration dialog. (Patch by Achim Kalwa)
  • Fix for bug #129 The “Other Properties” list in the Rename Components Configuration is not saved if the list is empty. (Patch by Achim Kalwa)
  • New “Focus Code Editor” expert, provides a keyboard shortcut Shift+F6 to focus the code editor window.
  • Improved output in the Keyboard Shortcuts window: Modifier keys are shown in a separate column. The list can be sorted by clicking on the title column.
  • Workaround for bug #127: Open File now always sets the focus to the code editor when a file was opened.
  • Separate configuration dialog for printing in class browser moved to a new tab in the standard configuration dialog
  • Moved the “Parse map file” option to the main search dialog of Grep
  • Fix for bug #124: Error while installing multiple design packages
  • Partial bugfix for Grep search in form files (bug #120): If multiline search is *not* active, no matches are found. Not sure this fixes the problem that is originally reported in #120 since I was never able to reproduce the problem.
  • Also add a size grip to the GExperts configuration dialog (Patch by Achim Kalwa)
  • Unfold source at found position for Previous / Next identifier editor expert
  • Unfold source when jumping to code editor from procedure list
  • More flexible Convert Strings expert
  • Lots of small improvements to the code base that are not visible to the user.

Please note that the naming scheme has changed. The files are now called GX<DelphiVersion>_<GExpertsVersion>_experimental_twm_<date>.exe. where the GExperts version is now fully spelled out as 1.3.14 rather than 1.3E.

There is also one change that some of you might not like:
I was getting lots of emails containing feature requests and bug reports that were sent via the bug report / feature request dialog in GExperts. Since I usually don’t have the time to immediately attend to them they tend to accumulate in my inbox and clutter it until I find the time to wade through them and usually create a feature request or bug report on SourceForge. This process is not only time consuming but also error prone.

I prefer to work on the actual program rather than being my own secretary. So, from now on the the dialog mentioned above links to the appropriate page on SourceForge instead.

Yes, that means I expect my users who want some bug to be fixed or a feature added to invest the effort to:

  • Create an account on SourceForge if they don’t have one.
  • Write a detailed bug report / feature request, including screen shots if that’s helpful.
  • Answer any questions that might arise from these reports via SourceForge.

If you don’t like this, think about your attitude. You are getting this tool for free after all and nobody forces you to use it. (Yes, I have received some rather disturbing emails when I asked people to file a bug report on SourceForge instead of sending them to me or posting them in some forums. Please remember: I don’t get paid for my work on GExperts, you are not my customers, therefore I don’t need to be “service minded” as somebody called it.)

The new version is available for download on the GExperts download page.

 Posted by on 2019-09-08 at 14:23

Various bugs in the GExperts code formatter fixed

 Delphi, GExperts  Comments Off on Various bugs in the GExperts code formatter fixed
Sep 082019
 

There were some long standing bugs in the GExperts code formatter, most of them concerning language features that didn’t exist back in Delphi 2007 (and therefore were not my primary concern for a long time). I have fixed several of them now:

  • Anonymous methods were not indented correctly
  • Various problems with Generics as reported here and some more I found myself while testing the ones reported

In addition there are the bugs I already fixed last weekend:

  • Variant records with methods were not indented correctly
  • The formatter did not know the ‘final’ keyword

I’m pretty sure that the quality of the GExperts code formatter now exceeds the one of the built in formatter in the Delphi IDE (which in my eyes only recently became actually usable, the first versions were just bug ridden proofs of concept). That of course doesn’t mean that it is perfect now. If you find any more bugs, please report them! I cannot fix bugs that I am not aware of and there are still a lot of language features that I don’t or rarely use myself. Please include examples of wrongly and correctly formatted code with these reports (as actual text, not as a bitmap).

 Posted by on 2019-09-08 at 11:44