Well, thanks to JDT's quite comprehensive APIs this is not too complex to implement, and I wrote down a simple version of this completion engine (10 locs).
This is how it looks like in action now:
- How often do you just remember a few letters but don't know the complete name of a method or member?
- Would you like to see such a completion engine in Eclipse?
- What else would be missing?
I would be glad if you could send your thoughts to the code recommenders forum.
Stay in touch. Follow me on Twitter.
Update #1: Neat research on this topic.
I just found a paper (almost) exactly on this topic. Could you check out these screencasts?
Update #2: Prototype available.
After a quick and dirty monday afternoon hack a first prototype is ready. In a nutshell, it takes your prefix entered and creates a regular expression from it. For example, when entering button.stx|<^Space> the engine only presents those proposals that match this regular expression .*s.*t.*x.* which finally may match "setText(text)". This is roughly what Maxime proposed in his comment below.
In addition it now respects upper case letters as suggested by Deepak. For example button.sT<^Space> now evaluates to '.*s.*T.*' whereas button.st would evaluate to .*s.*[tT].*.
Currently, it does not reduce the proposal score as recommended by another comment nor does is give precedence to those words that match the prefix - but we may do that if you find this more useful. Just drop a comment in the forum mentioned below.
Please find the installation instructions here:
Please send your comments to the forum here: