Control function + Click on Delphi XE does not work

In Delphi 7, whenever I control + click a function / procedure, it gets me to this function / procedure. But it does not work in Delphi XE - at least not with all functions. I have an Associate function in ExtUtils.pas The function is compiled correctly, so the compiler can find ExtUtils.pas (and, of course, ExtUtils is added to the Uses clause and its folder is added to the "Library path"). But when I control + click on a function or unit name, it does not turn me on.

Any way to fix this?


Update1: In addition, Control + Click on a function (declare in the current block) does not move the cursor in the INTERFACE section where the function is declared.

UPDATE2:
I temporarily put the ExtUtils block in the project folder, and now it works. Thus, Control + Click by itself works, but it seems that the IDE has problems finding the device, even if its folder is present in the library path and view path.

Related reports:
http://webcache.googleusercontent.com
http://webcache.googleusercontent.com
http://cc.embarcadero.com/Item/28269
One report right here (see Answers below)


New test:
I completely deleted Delphi (and manually deleted the files and the rest of the registry). Then reinstall again. NO additional tools other than CodeSite were installed, even databases. Then I created a new project. It contains a button. When I click the button, it starts the TestMe procedure, which is defined in the external PAS file called TestUnit.Pas. I added the path to this library in the library path and view path. But the Control + Click on TestMe procedure still does not work! If I hover over the TestMe procedure, the pop-up message "Declared in TestUnit", where the word "TestUnit" is a blue link. If I click on it, I hear the sound of a Windows system, but the IDE does not accept me there (in a block).

The TestMe procedure is as follows:

procedure TestMe; begin Beep(800, 500); end; 

If I control + click on the Beep procedure, this leads me to Windows.pas. So it works. Please let me know if you mean another test.

UPDATE:
And now it works! For no obvious reason! I just opened and closed and compiled the project. But I do not make any changes in Delphi, except for these two: autosave options-> Editor files and project parameters.

UPDATE:
This can not be !!! So, now I can access the TestUnit.pas file when I control + click on the TestMe procedure. So, I moved the original PAS file (ExtUtils.pas), which did not want to work in my initial testing (before reinstalling Delphi) in the same folder where TestUnit.pas is located. Guess what: I can open (with control + click) on TestUnit.pas, but not ExtUtils.pas !!!!
Delphi is acting so weird and inconsistent!

UPDATE:
I edited ExtUtils.pas and now I can not open AGAIN TestUnit.pas. Ken White won't let me say that Delphi may have errors. Therefore, I can not use the "error" with "Delphi". Can someone convey these words to me?

UPDATE:
I completely deleted any link to ExtUtils.pas - so I restored the project to such an extent that it worked (with TestUnit). But now the error persists. Even if a few seconds before he worked with TestUnit, now it does not work again.

UPDATE:
Now I understand the important thing: in my source code (in the test project) I have one line of compiled code:

 procedure TForm1.Button1Click(Sender: TObject); begin TestMe; end; 

Blue dots are not displayed for this code - since it would not be compiled. In those few minutes when the program was working, I saw blue dots. I also excluded the option "Autosave" - ​​"Editor files and project parameters" as a possible reason for this problem.

UPDATE:
I found a way to fix the problem ... in a few minutes: I move the project and library to another folder (any place will do this). Management + click will work for a while. It even works if I get the files back to the original folder. So it looks like Delphi is keeping some kind of cache of some files. As long as the cache is broken and it stores the cache, control + click won, that’s the job. But when I move the files, it must recreate this cache so that it works until the problem reappears and is saved in the cache.

+8
delphi delphi-xe delphi-ide
source share
7 answers

Here we are 5 developers using Delphi 2010 and 2, also using XE, and we experience the same thing with Ctrl-click like you. It seems to stop working randomly. We could never find a template or fix it. Therefore, from time to time we hear the oath from the cabins ...

When this happens, I use shift-ctrl-F to do the search.

Sylvain

+6
source share

First of all, thank you all for giving tips on this issue. Perhaps this is a question a long time ago, but finally, after many attempts, I think that the cause of the problem is, in fact, the "source code of the project"

IDE Version: Delphi XE

try:

  • in the project settings -> Delphi Compiler -> Compilation, make sure that

    Debug Information: true

    Symbol Background: Background

  • in the project source file (dpk file opened by Project β†’ View Source), delete {$ REFERENCEINFO OFF} or change to {$ REFERENCEINFO ON}

Please note that step 2 is very important, even if step 1 is done, it still cannot view the source without step 2.

+3
source share

There have always been two different parameters in Delphi:

  • Library path - used when compiling your application.

  • Path to view - Code Insight is used, i.e. also for identifiers with control.

You need to check the second one. It should include the path to the source files that you are trying to navigate with Ctrl + Click.

+2
source share

I use Delphi 5 and Ctrl-click also has problems, I don’t know if it still works in the new delphi IDEs, but I can switch from declaration to implementation using CTRL-SHIFT-UpArrow or DownArrow. Hope this helps.

+2
source share

I found that if I use a record type in an interface section and is not defined by a type expression, Ctrl-Click and other transition functions (Ctrl + Shift + Up / Down) will not work.

 type TForm1 = class(TForm) ... public Something:record A, B:integer; end; procedure DoSomething; end; 

With the above code, I can’t proceed to implement the procedure using Ctrl + Shift + Down. The fix I should use is:

 type TMyRecord = record A, B:integer; end; TForm1 = class(TForm) ... public Something:TMyRecord; procedure DoSomething; end; 

Tested with Delphi XE4.

+1
source share

In future. Using Delphi 2010, I found that ; the preceding virtual in the interface section has the meaning:

 function MyProc(): String; overload; virtual; function MyProc(): Integer; overload; virtual; // >> ^ << 

This symbol ; can break CTRL + Click functionality (code). However, it compiles.

+1
source share

( Symbol reference information ) This option is not effective if the Debug and Local symbols option is enabled (see above).

The functions for completing the code and navigating the code (Ctrl + Click) work only when reference information is set for Symbol help information.

0
source share

All Articles