code completion help...

John Birch jbb at kdevelop.org
Wed Feb 14 02:28:40 GMT 2001


On Wed, 14 Feb 2001 14:58, Roland Krause wrote:
> --- Daniel Berlin <dberlin at redhat.com> wrote:
> > Roland Krause <rokrau at yahoo.com> writes:
> > > A really stupid question. I sincerly apologize... but
> > > What is wrong with the existing class parser?
> >
> > It's nowhere near good enough to do code completion.
>
> An even more stupid question :-)
>
> So what?
>
> It parses good enough for a graphical classviewer but not
> for code completion? Is it not fast enough or what is the reason for
> that? Could it not be enhanced with an API that doesnt change much and
> on which the actual code completion could be built. Then the class
> parser can be replaced later.

I'm with Daniel on this one. The class parser in it's current state isn't 
good enough. There's quite a few problems even for the graphical viewer. To 
name a few, namespaces can have problems, templates can have problems, 
doesn't parse libraries (eg kdelibs, qt etc), doesn't store results, uses too 
much memory, and there are others.

It is a useful first pass a the problem though, and yes, I think for code 
completion we might as well assume that the class parser will be good enough 
one day. 

So here's a project for someone.
Use a good existing parser (eg ctags) to parse the project source. Put output 
into a database. Rewrite the class viewer to hold only the visible items in 
memory. Allow the parser to parse libraries and "merge" (in some fashion) the 
results into the tree.
Anybody? Check with other kdevelop people on what they may be thinking before 
starting though just in case it's not already done in in the HEAD branch of 
kdevelop, and remember this is just of the cuff so there will be a better way 
forward...

jbb

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list