RSP-13746: Code Completion for compiler directives, conditional compilation. I always end up in the help files whenever I need to insert a compiler directive. It would be nice if code completion worked for directives and perhaps also conditional defines / conditional compilation switches (if/ifdef, etc)!

RSP-13746: Code Completion for compiler directives, conditional compilation. I always end up in the help files whenever I need to insert a compiler directive. It would be nice if code completion worked for directives and perhaps also conditional defines / conditional compilation switches (if/ifdef, etc)! 
http://docwiki.embarcadero.com/RADStudio/Seattle/en/Delphi_Compiler_Directives_(List)_Index

I'd love to be able to write {$ and press ctrl-space and pick the right switch.

I'd love to be able to write {$ifdef and press ctrl-space and select from defines in scope.

I'd love to be able to write {$warn and press ctrl-space and pick from the available warnings.

https://quality.embarcadero.com/browse/RSP-13746?filter=-2
https://quality.embarcadero.com/browse/RSP-13746?filter=-2

Comments

  1. I hope this doesn't derail the thread (I voted) but does anyone else find the existing code completion can be rather buggy? I see:
    * Ctrl-Space - doesn't show anything sometimes. This is the most annoying to me
    * In a uses clause, if I type something matching part of a namespace, pressing Enter will select a unit that is that namespace plus something. Eg, if there is Foo.Bar and Foo.Bar.Test, typing Foo.B will complete to Foo.Bar.Test.
    * It shows hidden (strict private) fields from another unit
    * It doesn't work well with things like message dialog flags, often showing no suggestions

    ReplyDelete
  2. I agree that it can be buggy.  It doesn't always work well for generics and attributes, f.x.
    Are there QP reports for these issues, David Millington ?

    ReplyDelete
  3. David Millington I find showing hidden private fields the most annoying part. Do you know whether there is QC/QP for that?

    ReplyDelete
  4. Dalija Prasnikar, Lars Fosdal I don't know of QPs, and since I commonly ask people here, right now I'm feeling rather hypocritical. I will try to enter some. I tried to reproduce several of those just now in a new project, and whaddya know, it works perfectly. I haven't tried the strict private fields one yet but I suspect that's the only one I have a chance of reproducing, since I see it often - though only ever with one specific unit.

    ReplyDelete
  5. David Millington I tried to reproduce the issue myself and failed. That is the thing with bugs... they always appear when you don't have time to deal with them...

    ReplyDelete
  6. Had similar idea, or tips for Format/FormatDateTime, etc.

    ReplyDelete
  7. Inaccessible (e.g. private) members should be in autocompletion list I think but should come after suitable options. It's useful to quickly investigate which properties/methods class have.

    ReplyDelete
  8. Jacek Laskowski CnPack Wizards (CnWizards) does have basic completion for compiler directives.

    ReplyDelete

Post a Comment