Code completion in KDEStudio

John Zedlewski zedlwski at Princeton.EDU
Sun Apr 8 22:33:19 UTC 2001


Hey guys,
  I haven't looked into the studio source for a long time (like a
year+), but here's how it used to work (hope you haven't heard this one
already).
  If the user has typed like "someVar->", Studio (secretly) inserts some
text like FAKESTUDIOMETH after the "->", so it becomes
"someVar->FAKESTUDIOMETH" (but the user doesn't see that).  It then
dumps the modified code to a temp file and tries to compile it with
g++.   Of course, it won't compile, because it has this fake method
name, so Studio then greps through the error messages for an error of
the form "no matching function for call to Foo::FAKESTUDIOMETH".  Then
Studio knows that Foo is the class type of "someVar", and it can just
get the method list from the class tree.

  Now THAT is like the definition of an ugly hack.  If I have time this
summer, I'll definitely look into integrating the g++ parser, but it
would be a tough job...
 --JRZ

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



More information about the KDevelop-devel mailing list