[Lazarus] Feature Request: more intelligent code completion

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Mon Jan 30 13:08:59 CET 2017


On 2017-01-30 11:47, Mattias Gaertner via Lazarus wrote:
> 
> It did correctly deduce the datatype Boolean, did it not?

Yes it did.


> The only missing thing is to place it at the right place,

Indeed. The code I wrote was "BuildProject.Verbose := ...", so it should
query the data type of the BuildProject object, and make the class
completion suggestion for that class.


> 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.

Ah, so we learn something new. I didn't know about the interactive one.
I also see Lazarus v1.3 didn't have that functionality - I guess I need
to update that development VM with a newer Lazarus.


> 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).

Yes. I just tried the interactive code completion now - just to see what
it does. It created a public variable bit in the wrong class. It didn't
use the BuildProject object, but rather the class I was in. So in this
case the generated code also didn't make any sense of leave code that is
actually compilable.


> It is a half implemented feature.

Indeed, it seems the functionality is almost there.


>> I can file this as a feature request on Mantis if need be.
> 
> Yes, please.

Reported as....

  http://mantis.freepascal.org/view.php?id=31299


Thanks Mattias.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the Lazarus mailing list