rstudio/rstudio — pull request #207 by kevinushey (2014-11-17 19:10:40+00:00)
Title: More work for R autocompletions

There's currently a lot stuffed into this PR -- and one thing I'd like to sort out before we merge is how far we want to take the evaluation of e.g. generic expressions (function calls) for completions.

Summary of new bits in this PR:

1. We record a few more completion types, mainly relating to S4 and R5 classes.
2. We parse the `Slots` help field so that we can display help for e.g. S4 classes, or occasionally (constructor) S4 functions where arguments are left undefined in lieu of documentation provided for a slot of the same name.
3. We have a generic utility for getting an appropriate help topic from an object -- this ensures that e.g. `x$foo <- dir`, `x$foo` gives help for `dir`. We do this by finding the namespace the function was defined in, looking for the object name in that namespace with the same definition, and then getting help based on that object name + package.
4. We parse the description lists in options, so we get help popups on the autocompletion results in e.g. `options()`.

There are also a couple minor fixes re: C++ indentation, completion popup presentation.