The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Delphi – 2010/2009 code-completion changes making life harder..

Posted by jpluimers on 2010/02/01

I’m trying to create a list of code completion changes in Delphi 2009 and 2010 that make life a harder (as compared to Delphi 2007).
The reason is that I want to post a summary in a QC report, so they get fixed.

Please comment below to add your own.
I’ll summarize in a week or 2.

These are the ones I found:

  1. When the code completion list is visible, pressing the Enter key would select the topmost item and complete it
  2. When you press ctrl-space to activate the code completion list, and you had already typed part of an identifier, the topmost item would match this identifier

I have the idea that this is caused by the fact that when the code completion list becomes visible, the topmost item in the list is not automatically being selected in Delphi 2009/2010, where in Delphi 2007 (and before) it was.

It seems you now need to press the down-arrow once to select it.
That means one action extra, while the code completion list has always meant to be a productivity boost.

Please comment….

–jeroen

21 Responses to “Delphi – 2010/2009 code-completion changes making life harder..”

  1. Shane said

    I just upgraded from Delphi 7 to Delphi XE4, and I’m having the problem described above (about Code Completion NOT selecting the 1st entry automatically, like Delphi 7 does).

    This has been driving me *crazy*, and I found the answer (solution):

    http://embarcadero.newsgroups.archived.at/public.delphi.ide/201103/11032712662.html

    Turn OFF “Auto Invoke”, and then it works (like it used to, in Delphi 7).

    NOTE: you do have to *manually* invoke Code Completion with CTRL+SPACE (but I’m so used to doing that, it is almost automatic for me).

    Anyway, this makes Delphi XE4 usable now.

  2. […] […]

  3. Michael Skachkov said

    Hi there!

    Just recently i found interesting issue about breaking Code Insight feature in Delphi 2010: if clear Unit aliases field in project options – Code Insight will not work – drop down list can’t appear (after delay) and error insight works much more incorrect than usual.

    I reproduced this on all projects in my company. Cannot tell you for the moment if it happens on blank project too, though.

    the reproducible steps:
    1. remove value from Unit aliases option
    2. build project
    3. at this step Code Insight does not work as it should
    4. paste back default value to Unit aliases
    5. build project
    6. at this step everything works as it should

    • Norman Hadfield said

      Thanks.

      This solved it for me. My project had no unit aliases specified but I created a new project, copied the defaults, added to my project and built the project.

      How the heck did you figure that out?

  4. Michael said

    Have you made a QC report? I cannot find it.

  5. Michael Skachkov said

    François

    well, the problem is that I can understand that, but cannot that :)
    in big projects it is often impossible to include everything to project
    (btw, project manager in its current behavior is not very effective for thousands of files –
    there is no search and/or filtering).

    if we consider that as a fact, then it is anyway IDE’s responsibility – to handle all of necessary files.
    otherwise – why to say that it is a good feature if i cannot use it?

    *again, i’m ok if IDE needs to collect information about used files on first build. this would solve problem, i suppose

  6. Like Michael, I’m working on a very big (~3000 units) project at work, which we recently updated from D2007 to D2010. But IME, Code Completion is working a whole lot better now than it did in D2007. (Error Insight still needs a lot of work, though…)

    • Michael Skachkov said

      Mason,

      i have a feeling that Code Completion feature is very dependent on the fact that files used in projects are included in that project file. if most files are in shared folders (like in my project) then it behaves much worse.

      PS. yes, it’s a bit better than in D2007, but…

      • François said

        Michael,
        It’s more than a feeling (pun unintended, Boston fans), the IDE is globally much more responsive when all the units are in the dpr and nothing left to “search”.

  7. Michael Skachkov said

    Most annoying bug for me is that actually Code Completion sucks on BIG projects.

    This is related to two things:
    * error insight
    * drop down list

    there are several things to improve:
    * if project compiles well, there must be no error insight marks!!! this is so obvious and natural that until it works this way i can’t consider this feature as working
    * if project compiles well, there should be no reason to not to show drop down list. in Delphi2010 on big project i see it everyday: project builds and compiles well, but when trying to open drop down list it says that “can’t do that due to errors in code” (in Messages view)
    * As long as Code Completion works together with Error Insight and Help Insight, then I would recommend R&D guys to have some kind of cache where all necessary info would be placed. I mean when code insight, help insight and error insight work slow – it decreases developer’s productivity. It is ok for me if IDE will build some data and load it to RAM on first build. but THEN it should work fast. it is really not a problem for me to add more RAM to PC if it is necessary. but when I look at IDE when it tries to parse/prepare every source files on the fly again and again sometimes I wan’t to cry :) (NOTE: my project contains about 3000 units (including form units))

    concluding:
    1) there should be no problem/delays in Code Completion work if project compiles well
    2) Code Completion must work fast – otherwise it is not very usefull

  8. Visli said

    Mybe you can try CnPack.

  9. Ali said

    Well things are even worse with enabling auto-invoke for code completion. It is totally broken.

    Code Completion add-in in CnPack has some minor bugs, but it is totally superior to Delphi’s own code completion, specially for auto-invoke feature.

    I hope it is fixed in Delphi 2011. It is a shame for a decent IDE to have such a broken code completion feature + that damn buggy error insight!

    Thanks for bringing up this issue.

  10. David Moorhouse said

    Well spotted, I thought it was just me :)

  11. Azeroth said

    They probably copied it from some other IDE. It’s the Borland way – copying the features that are worse.

  12. Michael said

    This is the most annoying bug in 2009/2010. It feels absolutely unusable.

    Bug 3: Event handlers are not listed anymore. Have a procedure OnButtonClick(Sender: TObject) in the class and try to Assign it to myButton.OnClick := OnButtonClick is not selectable. (Broken after 2007)

    Bug 4: Abstract members or unimplemented members of an interface had a red color on 2007. (Broken after 2007)

    I must use the Code Input Helper from CNPack (with a bad bug in 2010), because the code completion is such a big f***ing s**t.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.