Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open File at Cursor Does Not Open the File in the IDE

When I mouse over the UnitNames within the Uses clause a window pops up showing the UnitName Namespace. For example when I mouseover the SysUtils unit I see SysUtils Namspace in a popup window. If I right-click on SysUtils and choose Open File at Cursor the source code opens in the IDE.

If I right-click and choose Open File at Cursor on some of the other untis I am presented with an Open File dialog box.

How come all the units don't simply just open into the IDE?

like image 843
Michael Riley - AKA Gunny Avatar asked Dec 13 '25 15:12

Michael Riley - AKA Gunny


1 Answers

This happens when the source (.pas) file isn't on the current Search or Browsing path.

You can usually fix it by simply adding the unit to the project (right-click project in Project Manager, choose 'Add', navigate to the file, and double-click. This adds it to the .dpr file and makes it readily available to the IDE.

You can also add it to the paths using Project->Options->Delphi Compiler->Search Path or Tools->Options->Environment Options->Delphi Options->Library->Browsing Path.

like image 122
Ken White Avatar answered Dec 15 '25 05:12

Ken White



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!