[Lazarus] Feature Request: more intelligent code completion

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jan 30 12:47:52 CET 2017


On Mon, 30 Jan 2017 11:09:19 +0000
Graeme Geldenhuys via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

>[...]
> Now the BuildProject class doesn't have a Verbose property. The
> TBuildDelphiProjects class does have a FVerbose field of type boolean.
> So the data type of FVerbose is known, so to deduce what the missing
> property "Verbose"'s data type should be is known (or should be known).

It did correctly deduce the datatype Boolean, did it not?
The only missing thing is to place it at the right place, somewhere in
TBuildDelphiProjects or its ancestors. Since this is not yet
implemented you have to do that manually. 

 
>[...]
> It would have been a lot more logical, and to actually generate
> compilable code, if Lazarus prompted me (user configurable) to say that
> it wants to implement the missing property "Verbose" for the object
> BuildProject (of type TBuildProject).

There are currently two code completions: the interactive Ctrl+Shift+X
and the non interactive Ctrl+Shift+C.
In this case you almost always wants the interactive version.
And this dialog needs to be extended with options for what to create
(in which class, a var or a property, what kind of property).


>[...] 
> Lazarus (v1.3 and v1.7) generated the same code as show above, and
> neither is compilable afterwards! So I don't know what Lazarus was
> trying to achieve by introducing that local Verbose: boolean variable.

It is a half implemented feature.

 
>[...]
> I can file this as a feature request on Mantis if need be.

Yes, please.

Mattias


More information about the Lazarus mailing list