Ian Branch 128 Posted April 10 Hi Team, Win 11, D12.1. They used to, but I have just noticed that if I disable a DEFINE, {.DEFINE XXXXX}, the code between the {$IFDEF XXXXX} & {$ENDIF} no longer greys out the code inbetween. It used to. If I create a new project and do that, it works. Is there somewhere in my projects that I may have inadvertantly switched off that would cause this? This is an actual example where the code isn't being greyed out: Regards & TIA, Ian Share this post Link to post
Die Holländer 49 Posted April 10 I have noted something like this by the {$IFDEF DEBUG} switch in D11.3. When switching the "Build Configurations" from Debug to Release nothing happens. When staying in the Unit and do Compile or Build nothing happens. but When I switch in the editor from that source/unit tab to another source and back it works and the editor will gray-out the proper sourcecode. Share this post Link to post
Lajos Juhász 295 Posted April 10 In D12.1 the units I have tested the color is changed after 0-15 seconds. Share this post Link to post
Ian Branch 128 Posted April 10 (edited) 16 minutes ago, Die Holländer said: When I switch in the editor from that source/unit tab to another source and back it works and the editor will gray-out the proper sourcecode. Nope. Didn't work. The IDE knows about the {.$DEFINE XXXXX} because further down code that was enabled by the Define shows as an error in the Structure. At run time all is as it should be. I have also noticed Conditionals from the Project aren't being handled correctly at Design time either. 😞 Edited April 10 by Ian Branch Share this post Link to post
Uwe Raabe 2064 Posted April 10 54 minutes ago, Ian Branch said: but I have just noticed that if I disable a DEFINE, {.DEFINE XXXXX}, the code between the {$IFDEF XXXXX} & {$ENDIF} no longer greys out the code inbetween. As this feature is driven by LSP, it looks like the code contains a construct LSP is stumbling about. Do you notice any other problems with Ctrl-Click navigation, error insight or code insight? Share this post Link to post
Ian Branch 128 Posted April 10 (edited) Hi Uwe, Ctrl-Click works fine. CodeInsight doesn't throw anything up. ErrorInsight doesn't show anything. Ian Edited April 10 by Ian Branch Share this post Link to post
Ian Branch 128 Posted April 10 FWIW, it is doing it on all my projects, even ones I haven't touched in a while. 😞 Share this post Link to post
Ian Branch 128 Posted April 10 I just checked an old Console App and it is doing the same thing there. 😞 Share this post Link to post
Ian Branch 128 Posted April 10 I can create a new project and it all works fine/as expected. Share this post Link to post
Lajos Juhász 295 Posted April 10 The IDE can be strange from time to time. I have a unit that I cannot edit it. If you try to add a property the editor will jump to another line. The only way to edit is to paste the text from another editor. I have tried to create a sample project to reproduce the bug and report it and failed. When I copy the class that fails in the text project I cannot reproduce the bug. Share this post Link to post
Ian Branch 128 Posted April 10 Thank you to all for your input so far. Appreciated. The fact that I can create a New project and it works fine suggests that the functionality itself is still there and working. I opened a project that I hadn't touched for months, it worked fine.... Which suggests something related to ALL my current projects. I tried adding a new form to a current project and testing, same result. 😞 Share this post Link to post
Ian Branch 128 Posted April 10 Found it!!! Seems somehow all my current .dproj files have been corrupted. 😞 Deleted and rebuild, all good. Very strange. Thanks to all for your inputs, appreciated. Ian Share this post Link to post