Code completion
Benoit Cerrina
benoit.cerrina at writeme.com
Thu Jan 13 21:54:11 GMT 2000
Hi,
this is probably a nice base, but I'm not sure this can be used to gain the
same level of completion of what exist for the MS tools (I never tried the
Symantec or Inprise so I can't tell).
In those tools if you write a '.' after a variable name for example the tool
(VC++ VJ++ or VB) knows the type of the variable and can propose a list of
syntactically correct completion, not only one that existed previously.
Maybe it could work if Kwrite detected the variable declaration and at this
time automatically inserted in the KCompletion dictionnary all the allowed
completions.
Tell me what you think.
Ben
PS:
your web page cannot be viewed by kfm
On jeu, 13 jan 2000, you wrote:
> Hiya,
>
> > > i have a little wish. what about add code completion (like c++
> > > builder, delphi & m$ visual toolz...) in kdevelop 2? :) it would be
> > > very helpful and do the work on the class jungle more comfortable.
> >
> > Yes, would be a really nice feature. Unfortunately there is no volunteer
> > who will implement this. :-(
>
> I'm not subscribed to this list -- I just found this thread accidentally
> on lists.kde.org (so please CC any replies to me).
> I wrote a class KCompletion, which is in kdecore now. It is a generic
> class, that takes any number of completable strings and stores them
> internally. Now when a user wants to complete some string, he presses some
> key-combination. kdevelop/kwrite should just catch that key-event and call
> KCompletion::makeCompletion( the_to_be_completed_string ) -> KCompletion
> will return you the first matching string.
>
> There are two different modes, auto-completion and shell-completion. The
> former returns a complete matching string, the latter returns the largest
> possible completion (when there are multiple matches), just like the shell
> does. It's pretty easy, yet flexible, just have a look at kcompletion.h --
> kdoc-documentation is included.
>
> So for the beginning, kwrite could just insert all words of a document
> into a KCompletion-object and call makeCompletion() on demand.
>
> Richard Moore <rich at kde.org> wrote on kde-core-devel a few days ago, that
> he has some classes for managing name-spaces. Combining those with
> KCompletion may give you different completions for different classes.
>
> Cheers,
> Carsten Pfeiffer
> --
> http://www.geocities.com/SiliconValley/1632/
--
Benoit Cerrina
More information about the KDevelop
mailing list