delphidelphi-2010conditional-compilationcode-navigation

Code navigation breaks inside of $IFDEF blocks in Delphi 2010


I have a few conditionally compiled classes in my app.

{$IFDEF SOME_OPTION}
type
  TMyClass = class
    procedure Foo;
  end;
{$ENDIF}

...

{$IFDEF SOME_OPTION}
procedure TMyClass.Foo;
begin

end;
{$ENDIF}

That option SOME_OPTION is defined in "Project Options" - "Delphi Compiler" - "Conditional Defines" and in "Project Options" - "Resource Compiler" - "Directories and Conditionals" - "Defines a preprocessor symbol" for this project.

When I try to Ctrl+Click on their methods, nothing happens, code navigation don't want to work.

I use Delphi 2010. How can I solve this problem?


Solution

  • It is a bug, and the chances of it being fixed are zero.

    / Warren P