code completion help...

Marcus Gruendler runner at tamalin.de
Sun Feb 4 13:58:07 GMT 2001


On Saturday 03 February 2001 13:05, you wrote:
> On Sunday 04 February 2001 03:34, you wrote:
> >   But this simplicity doesn't hold at all for completing on object
> > instances.  If I declare a local "FooClass x;", then later type "x.", I
> > want to see a list of all the non-static members of FooClass. But, at the
> > moment, I don't even know the type of "x", and no regular expression will
> > figure that out. Consider, for instance, that the "x" variable might
> > actually be declared anywhere in the current method, as a static or
> > instance field of the enclosing class, or as a global object.
>
> you're right.  as of now my code completion will only recognize class
> variables that are picked up by kdevelop's class parser.  but i don't see
[...]
>
> the global variables do pose a major difficultly according to my current
> plan...=(
>

Hi, 

I just had a look into the source code of the KDEStudio IDE which has code 
completion (which is indeed quite fast!). They bypass the global object and 
#included classes problem by running the gcc preprocessor (gcc -E -save-temps 
or so) and analyzing the restulting files with the ctags program.

One might think this is terribly slow, but it's really fast: a 500kB file 
(which is not too large if you consider all the included headers) is analyzed 
in less than half a second by ctags.

Maybe this could point KDevelop code completion development into a usefull 
direction. If KDevelop would even manage namespaces and code completion 
correct it would be *the* killer app (well, okay it already is ;-).

Just my "2 Pfennige".

Bye, Marcus

-- 
Marcus Gruendler
eMail: runner at tamalin.de
WWW  : http://www.tamalin.de/runner/index.html


-
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