[Lazarus] Find declaration bug?

patspiper patspiper at gmail.com
Sun Sep 30 11:16:51 CEST 2012


On 30/09/12 08:52, Mattias Gaertner wrote:
> On Sat, 29 Sep 2012 22:33:34 +0300
> patspiper <patspiper at gmail.com> wrote:
>
>> Hi,
>>
>> I am not sure if this is the intended behaviour, and hence my post.
>>
>> Under Ubuntu 11.04:
>>
>> Create a new project, set its Target OS (Code Generation) to win32 and
>> set LCLWidgetType to Win32 in IDE Macro Values. Add unit seri and try
>> autocomplete. Code Tools will not suggest anything as expected since the
>> FPC serial unit is unix only. Complete it manually to serial. Hovering
>> the mouse over 'Serial' will show the hint:
>> unit
>>    Serial
>> /home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/unix/serial.pp(5,6)
>>
>> Right clicking / Find Declaration will open the serial unit, when it is
>> not available for Win32. Right click/Open File at Cursor opens it too as
>> expected. Should Find Declaration open it in the first place?
> 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
- 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)

Stephano




More information about the Lazarus mailing list