# How can autocomplete entries be added for DownValues and Properties?

I'd like to assign DownValues to a symbol like this

x["firstvalue"] = 1;
x["secondvalue"] = 2;


And then have the DownValue keys "firstvalue" and "secondvalue" offered in an autocomplete list once I have entered x[.

Another useful application for this kind of modification is to have the "Properties" of an object like a FittedModel added to the autocomplete list. It is not always easy to remember "SinglePredictionConfidenceIntervalTableEntries", which is one of the 64 properties of FittedModel.

Can this be done? What controls the entries in the autocomplete "engine"?

@rcollyer, I don't understand your question. I can always call thisFit["Properties"] to find the properties of the fit or DownValues[x][[All,1,1,1]] to get the keys of x. You have improvements upon these methods? –  ArgentoSapiens Jun 25 at 19:00
Not on thisFit, obviously. But, DownValues[x][[All,1,1,1]] is stymied by fcn[] := . So, I've been using Case, but you have to get the pattern correct. –  rcollyer Jun 25 at 19:11
Ah for this case I've added the Keys function from this answer to my toolchain. –  ArgentoSapiens Jun 25 at 19:29