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 Keyvoard 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

GExperts and Delphi 10.3.2

 Delphi, GExperts  Comments Off on GExperts and Delphi 10.3.2
Jul 202019
 

Everybody and his brother – ahem – sister is blogging about the latest Update for Delphi 10.3 which has been announced two days ago. As always, Embarcadero’s servers are overloaded and have been down for hours. I have now started downloading the ISO and my browser is telling me it should be finished in 90 minutes. I’m not convinced yet…

The first feedback has been that GExperts seems to work with the new version but there is an access violation when exiting the IDE. I’ll give it a try once the download has finished and if I can actually install the new version.

edit: I’m impressed (not): Installing the update messed up my installation. The bds.exe is nowhere to be found. 🙁 Trying to un- and reinstall now.

edit2: Now it’s starting but tells me my update subscription has expired (I renewed it for a year back in May 2019.). Apparently something needs to be done with our license server. Don’t expect me to fix anything in GExperts for Delphi 10.3.2 until Monday. And then I will probably be too busy with work to do more than write an email to Embarcadero. Good thing I don’t need the latest and greatest Delphi version for work. I have a tight deadline already as it is. I don’t need the hassle of getting my primary tool to actually start on top of that.

Everybody else of course is welcome to get the GExperts sources and compile their own DLL to test. I’m interested in feedback about self compiled DLLs more than about the last release. If somebody can track down the AV and maybe even propose a fix that would be great.

 Posted by on 2019-07-20 at 11:17

GExperts adds copy and paste for Delphi Tool menu entries

 Delphi, GExperts  Comments Off on GExperts adds copy and paste for Delphi Tool menu entries
Jun 092019
 

In my last post I wrote about the export and import feature for custom Tools menu entries that GExperts adds to the Delphi IDE. I also mentioned that I was thinking about adding a custom clipboard format for copying and pasting these entries between multiple Delphi instances / versions.
OK, I did that. GExperts now also adds a popup menu to the Tool Properties dialog with two entries:

  • Copy entry to clipboard
  • Paste entry from clipboard

These entries use a custom clipboard format registered with Windows as "Delphi.ToolsEntry". It’s a binary format with the following structure:

  • Size: UInt32 -> the size of the structure
  • Title: array of WideChar, zero terminated
  • Path: array of WideChar, zero terminated
  • WorkingDir: array of WideChar, zero terminated
  • Params: array of WideChar, zero terminated

With this popup menu it is now possible to copy and paste Tools menu entries between multiple instances of the Delphi IDE. This works also between different Delphi versions, so you can copy the entries from Delphi 10.3 to Delphi 6 and vice versa.

There is no new GExperts release for now (I am waiting for the next Delphi point release which should be just around the corner. I’m just guessing, I have no internal knowledge about the release schedule.). In the meantime, if you’d like to get this feature, you will have to compile your own GExperts DLL.

If you would like to comment on this, go to this post in the international Delphi Praxis forum.

 Posted by on 2019-06-09 at 18:23