[Lazarus] Getting help for a type if its unit is not in uses

Flávio Etrusco flavio.etrusco at gmail.com
Thu Feb 6 12:22:16 CET 2014


On Thu, Feb 6, 2014 at 6:04 AM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 05.02.2014 23:24, schrieb Flávio Etrusco:
>
>> On Wed, Feb 5, 2014 at 4:50 PM, Reimar Grabowski <reimgrab at web.de> wrote:
>>>
>>> On Wed, 5 Feb 2014 12:25:18 +0100
>>> Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>>>
>>> Can we hope to someday get the feature that Lazarus adds the unit where a
>>> type/function/whatever is defined automatically to the uses clause when it
>>> is used for the first time (just like Eclipse does for Java imports)?
>>>
>>> R.
>>
>> FWIW if you get an "identifier not found" error while compiling, the
>> context menu in the Message View has a "Search identifier" command. It
>> opens the Code Browser (which also could be much cleaner) and searches
>> the class. Then you can open the context menu for the unit found and
>> select "Use unit FOO in unit BAR".
>
> In 1.0.12 you need to switch from "Project" to "Lazarus-IDE" to have it find
> e.g. "TObjectList". In 1.3 this works without the switch. Does someone know
> whether this is the case in 1.2 as well?

In 1.2RC2 it works correctly ("Project" is selected and "With required
packages" is checked).

> And is it by intension that one needs to select a node before the correct
> context menu is shown? (win32) E.g. doing a right click on the "type
> TObjectList = class(TList)" node without having selected any node shows the
> menu containing solely the various expand/collapse menu items (and the
> export entry).

Yeah, we definitely should enable eoRightClickSelect there.
Not to mention some other way cleaner dialog (or switchable tweaks in
CB), or better yet (as others already said), inline marking with
smarts in the codetools parser ;-) And indexing.

> Regards,
> Sven

Best regards,
Flávio




More information about the Lazarus mailing list