Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

New for Delphi Code Insight in 10.4.1

Delphi 10.4.1 is a quality-focused release, and this goes for code completion too! As well as helping you mimic classic code completion behaviour, we’ve fixed and tweaked many items.

When RAD Studio 10.4 was released, we redesigned Code Insight. While old (‘classic’) code insight is still available as a setting, by default Delphi now uses an asynchronous, non-blocking technology for code completion and related features. It means the IDE should not pause while typing, and you can use code completion while debugging, as well as many other benefits (searching completion results, for example.) You can read more about the tech here.

In 10.4.1 we’ve focused on polishing code insight. Because 10.4.1 is a quality release, there are very few new features – there are some new settings! – but the majority of the work is resolving bugs and tweaking behaviour. Here are some things you may want to know about: new settings, key fixes, and some special notes for very large projects.

New Code Completion Settings

Underlining Matches

10.4’s new code completion shows more results than old classic completion, by also listing items not just that start with what you typed (the ‘filter’ text), but that contain what you typed. (In 10.4.1, there is a setting to control including these extra items: see below.)

This is useful because it lets you explore and search the completion list by typing. Sometimes, it can be hard to see why a particular result is included in the list, and so in 10.4.1 the matching part of a symbol is now underlined.

Invoking code completion in 1041 with the default settings shows the matching filter text underlined

In this screenshot, you can see that ‘ScaleFactor’ was included because it contains ‘act’.

You can turn underlining off in the Options dialog – see the very next section for info on new settings.

Getting Classic Code Completion Behaviour

By default, the new code completion does not completely copy the old classic code completion behaviour. It shows more results, and uses a different algorithm to auto-select the best item in the list.

In 10.4.1, we added four settings, which combined allow you to get exactly the same behaviour as classic completion. All four are on the new Insight Options tab of the UI > Editor > Source page in the Options dialog.

Four new code completion settings

‘Filter text is underlined’ controls the new feature to underline the match, noted above.

To mimic classic code completion you can change the settings like so:

Key Quality Fixes

The 10.4.1 What’s New page lists many fixes, and I recommend you read the list. However, some that are particularly worth pointing out include:

Very Large Projects

Noted above are some changes for very large projects. Here is a quote from one of our customers about 10.4.1, which they have kindly allowed me to share:

Congratulations to the LSP team!

I have now managed to open&run our flagship app on 10.4.1. And – magic! – code completion finally works in our IFDEF-ridden main unit. I think last time code completion worked there was somewhere around D5 times …

It takes about 15 sec to work for the first time (it probably feeds enormous amount of units to the LSP) but after that it is a pure bliss to use!

Thank you!

This particular app is just under 3 million lines of code. And it’s the first time Code Insight has worked in that location since Delphi 5.

Every release, we continue to improve Delphi and C++Builder. 10.4.1 is notable because it’s a quality-focused release. We will continue to improve and change the IDE every time we ship a new version, and we hope that the code insight fixes alone, let alone the 800+ other fixed bugs, make 10.4.1 a very worthwhile version for you to install.

Exit mobile version