Invoking Ctrl +Click (Find Declaration)

Have a Raize Components question that does not fit into any of the forums below? Post it here.

Invoking Ctrl +Click (Find Declaration)

Postby CapeCodGunny » Mon May 26, 2014 8:20 am

How can I invoke the Ctrl +Click (Find Declaration) for Rz components?

I have my paths set up as follows:

Library Path:
C:\Program Files (x86)\Raize\RC6\Lib\RS-XE4\Win32

Browsing Path:
C:\Program Files (x86)\Raize\RC6\Source

Code: Select all
Uses
RzButton,     <-- Ctrl +Enter (works great)
Vcl.StdCtrls; <-- Ctrl +Enter (works great)

type
  TForm1 = class(TForm)
    RzButton1: TRzButton; <-- Ctrl +Click on TRzButton (nothing happens)
    Button1: TButton;     <-- Ctrl +Click on TButton (find declaration invoked)
  private
    { Private declarations }
  public
    { Public declarations }
  end;


I was able to get this to work if I added the source files to the Library Path but that is not what I want to do. Thanks in advance.
Michael Riley
GySgt USMC (Retired)
ZilchWorks
http://www.zilchworks.com
CapeCodGunny
 
Posts: 33
Joined:
Tue Jul 31, 2012 3:32 am
Location: Cape Cod, Massachusetts

Re: Invoking Ctrl +Click (Find Declaration)

Postby Raize Support » Wed May 28, 2014 4:28 am

From what I've been able to discern through observation is that the IDE needs to at least parse the various source files in order to locate declarations. I agree, that being able to use Find Declaration should be a simple matter of adding the RC6 Source directory to the Browsing Path. However, as you have discovered, this does not work. However, if you manually open a unit file (e.g. RzButton.pas) from the Source directory and then go back to your form unit and Ctrl+Click on TRzButton, the IDE will jump to the correct declaration. You can even close the RzButton.pas unit and when you Ctrl+Click again on TRzButton (or any other type in that unit), the IDE will open the RzButton.pas unit. However, when you restart Delphi, all of this is lost.

I have found that Find Declaration does work consistently when you add the Raize\RC6\Source directory to the Debug DCU Path list, but this is really what you want either because it's really not that much different than adding the Source directory to the Library Path. The IDE still compiles the source, but creates a copy of the DCUs file in the same directory as the project's output.

After a bit of research, it appears that the problem is related to the {$REFERENCEINFO} directive added to packages. We produce the pre-compiled DCUs and packages without any debug information, and no reference info either. The lack of reference info apparently causes the problem with the IDE not being able to locate a symbol. We could turn on reference info in the packages, but I'm hesitant to do that.

I suppose it might be possible to rebuild the DCUs by running !Build_RC6.cmd and editing the cmd file to turn on debugging info and then after generating the debug DCUs, move them into a new subdirectory and then reference that in the Debug DCU path.

Another option of course is to use Find in Files and simply specify the Raize\RC6\Source directory as the path. Or create a favorite link to the Source directory in Windows Explorer. This makes is quickly accessible in Windows Explorer as well as all file dialogs.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Invoking Ctrl +Click (Find Declaration)

Postby CapeCodGunny » Wed May 28, 2014 5:57 am

Raize Support wrote:After a bit of research, it appears that the problem is related to the {$REFERENCEINFO} directive added to packages. We produce the pre-compiled DCUs and packages without any debug information, and no reference info either. The lack of reference info apparently causes the problem with the IDE not being able to locate a symbol. We could turn on reference info in the packages, but I'm hesitant to do that.


Does the reference info in the packages get removed by the compiler when the project build configuration is set to Release?

Mike
Michael Riley
GySgt USMC (Retired)
ZilchWorks
http://www.zilchworks.com
CapeCodGunny
 
Posts: 33
Joined:
Tue Jul 31, 2012 3:32 am
Location: Cape Cod, Massachusetts

Re: Invoking Ctrl +Click (Find Declaration)

Postby Raize Support » Fri May 30, 2014 8:01 pm

The reference info is controlled by a compiler directive and is normally turned off when compiling for release. This is why Embarcadero supplies a Debug directory with dcus and dcps that have debug and reference info included.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests