[Lazarus] Find declaration bug?
patspiper at gmail.com
Sun Sep 30 19:32:21 CEST 2012
On 30/09/12 20:09, Mattias Gaertner wrote:
> On Sun, 30 Sep 2012 12:16:51 +0300
> patspiper <patspiper at gmail.com> wrote:
>>> This feature allows to explore code for non installed target platforms.
>>> Maybe this can be made optional.
>> The feature is handy indeed. One question arises though: If the unit is
>> different for several other target platforms, which one would be opened?
>> I can see the following possibilities:
>> - Keep it as it is
>> - Make it an optional setting
>> - Find Declaration looks for units only in the path while Open File at
>> Cursor opens the unit even if it is not in the path
> That means almost all codetools won't work because of "unit not found".
Maybe I chose the wrong terminology. By path I meant files/folders
usable/accessible for a certain target. For example the serial unit is
in <folder>/rtl/unix and will not be reachable for win32 targets. Find
Declaration will fail with unit not found whereas Open File at Cursor
will open it.
>> - Find Declaration presents a list of targets for which this unit exists
>> for the user to choose from (if it does not exist for the current target)
> I guess there is no FPC devel that knows that for all sources.
It could be a list of paths instead.
Anyway, IMHO the logical choice is for Find Declaration to fail when
looking for serial.pp for win32, and allow Open File at Cursor to open
it. In case Open File at Cursor finds several paths leading to the same
file, it could present a list of these for the user to choose.
More information about the Lazarus