RSP-13746: Code Completion for compiler directives, conditional compilation.

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

11 thoughts on “RSP-13746: Code Completion for compiler directives, conditional compilation.


  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


  2. 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.