From: "Zed A. Shaw" Date: 2005-03-30T22:35:19+09:00 Subject: Re: Open letter to anyone developing a Ruby IDE Weird, I was just working on this problem this morning in the index feature for fastcst. I have some code right now which indexes the source using suffix arrays and then lets you quickly search for stuff in the source. It could easily be "stolen" and turned into a code completion thing I think. Here's some of the results of doing "index .join" on my source: ./lib/fastcst/operation.rb: "File.join(target, path)" ./lib/fastcst/command/finish.rb: "File.join(@repo.work_dir, UNDO_JOURNAL)" ./lib/fastcst/command/list.rb: "\#{readable_path.join('/')} ]\"" ./lib/fastcst/command/disp.rb: "File.join(@repo.work_dir, MetaData::META_DATA_FILE)" ./lib/fastcst/command/merge.rb: "File.join(@repo.work_dir, MetaData::META_DATA_FILE)" Which is basically all the places where a .join "thing" is used, and probably enough information to figure out what possible parameters the .join takes. The "completion" could then simply be when you start to type a certain sequence (say "." followed by another char) it would do a search like this, collapse "similar" stuff and present that as the completion. Neat thing is this works with any source, not just Ruby, and requires no parsing. This is also fairly quick even though I'm storing the index in a serialized hash table. Anyway, is this kind of what you're looking for? Zed On Wed, 2005-03-30 at 14:00 +0900, Eric Hodel wrote: > On 29 Mar 2005, at 17:35, Lothar Scholz wrote: > > > Hello Adelle, > > > >> It has been said that features like "intellisense" or "autocomplete" > >> are > >> difficult to implement for dynamic languages such as Ruby. > >> > Where exactly does type inference come in for an auto-completion > feature for an IDE?