CTRL + Click not working
Code browsing is not working for my project. I set the Search Path to all the Source units 开发者_Go百科that I am using. And also I deleted the .local
and .identcache
files. My project is compiling with no problems. What can I do to make ctrl + click
work.
Thanks
One bug that I am aware of occurs when you have a class which declares a record inline, as so:
TMyClass = class
private
FData: record
MyData: Integer;
end;
end;
If you have any code like this then many of the IDE's code insight/completion/whatever features stop working. This fault stretches right back to Delphi 6 and possibly beyond.
I fix it with an class private type declaration:
TMyClass = class
private
type
TData = record
MyData: Integer;
end;
private
FData: TData;
end;
But if that syntax is not available in D2007 then you'd need to declare the record type outside the class.
Another factor which I find can confuse the IDE is if you are using a lot of conditional statements ($IFDEF
and the like).
Finally I'd recommend installing Andreas Hausladen's IDEFixPack which does improve IDE behaviour.
Of course, your problem may be caused by something else, but without being able to experiment with your actual code, we have to guess to a degree.
Ctrl-Click easily gets confused when you use conditional defines to control what code gets compiled:
{$IFDEF DEBUG}
...
{$ENDIF}
Usually it needs a couple of these, but sometimes a single one of these, especially in the interface section, is enough to send Ctrl-Click into confusion.
Another time when I have seen Ctrl-Click not to work is when you are using project groups and the unit you have in the editor does not belong to the project that is currently active in the project group.
I had same problem with code browsing in my module (in Delphi XE3). Look for your source code and find construction like this:
procedure procName;
begin
if ... then
begin
...
end else
end;
Attention to last "else". The compiler understands this code, but Code Browsing don't. It's need to insert ";" after "else" or erase "else". After this correction of source, the Code Browser is working.
精彩评论