Gather autocompletion-information while running tests?

Hi everybody,

I was looking around for some autocompletion solution for ruby. Most
sites tell me that ruby is too dynamic to write any simple IDE
supporting this.

I came accross the following idea:

Let's collect the information we need for autocompletion during running
tests.

Basically we need to know, what variable names in which functions (and
in which files) are instantiated as what kind of objects.
Then we could lookup all the available methods of those objects (either
a static list, or also looked up during the tests running).

Wouldn't that be a very easy solution for autocompletion? (though not
100% complete as it won't work for newly named variables)

The good side-effect would be that from then everyone would have even
more reasons to write good test coverage :wink:

I played around a little with set_trace_func, but i'm missing the local
variablenames here.

Probably the best would be to write a Ruby C extension that creates
something like (or exactly) ctags file to be interpreted by vim.

What are your thoughts?

Jan Kechel

- --
publictimestamp.org/ptb/PTB-9682 sha224 2010-08-14 12:15:42
267159826FCA305616B0A8A4DC01999AC0E80150A72CC14E4B668B7C

Basically we need to know, what variable names in which functions (and
in which files) are instantiated as what kind of objects.
Then we could lookup all the available methods of those objects (either
a static list, or also looked up during the tests running).

Wouldn't that be a very easy solution for autocompletion? (though not
100% complete as it won't work for newly named variables)

Is static analysis not enough for you?

ยทยทยท

--
Posted via http://www.ruby-forum.com/\.