code completion help...

Dimitri van Heesch dimitri at stack.nl
Sat Feb 17 14:35:15 GMT 2001


On Wed, Feb 14, 2001 at 11:12:27PM +0100, Oliver Strutynski wrote:
> > I know a parser that seems to be complete and written using Qt-classes. You
> > might want to have a look at doxygen (http://www.doxygen.org). This is a
> > documentation generator as kdoc is. It knows all relevant properties of a
> > class and its members (inline/virtual/private/const/...) and it can handle
> > namespaces properly. 
> 
> I am not sure about this, but as far as I know doxygen is not able to create 
> a fully referenced sourcecode. 

I haven't followed the whole discussion, but as the main author of 
doxygen I can confirm that this is true.

Doxygen actually uses two parsers for referencing source code: 
- one that extracts documentable entities
  (like classes, function, member, defines, ..) from the sources. This 
  one does a pretty good job IMHO. This info is used the generate the XML
  output.
- the other takes info gathered by the first parser to
  cross reference source code fragments with the documentation. This parser
  cannot handle the ambiguities you mention below. Partly because it is
  not good enough (yet), partly because there is just not enough context.

> It merely parses definitions and perhaps some 
> simple uses (correct me if I'm wrong) but there is much more you need to know 
> for a working code completion. 

I don't think M$'s DevStudio uses more info than this for code completion. 
But then that certainly isn't perfect either.

> (Consider a user typing something like 
> a(function1(), function2(1))->m and waiting for the code completion with two 
> visible definitions of method "a" with different sets of parameters and 
> possibly multiple definitions of the functions used as parameters as well.) 
> Also don't forget type conversion necessary for resolving ambiguities between 
> multiple definitions, template classes / functions, inheritance...

You could have added partial template specialization to make it even more
difficult ;-) 

For this you'd really need a real compiler and also
the time it takes to compile, which is probably not what you want for 
something that should be done in real time.

Just my $0.02 cents.

Regards,
  Dimitri

-
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