|Re: Fulltext autocompletion proposal [message #671088 is a reply to message #671049]
||Mon, 16 May 2011 18:12
| Marcel Bruch
Registered: July 2009
I just made the completion engine available on the HEAD update site. I dubbed it the "naive subwords completion engine" - please come up with a better name if you have one.|
Just a few words on the implementation. It's a very simple one that helps you on completing method names only - it does not compute proposals for types, variable names etc. yet. There is no particular reason for this but I haven't found a perfect place to make this code work for every kind of completion yet. Also it's an untested monday afternoon hack...
To install this completion engine just add
to your list of update sites and install the
Code Recommenders: Naive Subwords Completion (Incubator)
from Sandbox category as depicted below.
You may configure where/when Eclipse makes these proposals. Study the screenshot below for details.
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. Currently, it does not reduce the proposal score as recommended by another comment - but we may do that if you find this more useful. Just drop a comment below...
Please note, this is a quick shot to understand your requirements. Please
- send all your comments (positive and negative) to this forum,
- inform us about issues with the current implementation,
- if you want it to change in some way - tell us about it, and finally
- for the adventurous: the source is free (EPL) and contains just 2 small classes + a plugin.xml declaring a standard IJavaCompletionProposalComputer. Feel invited to checkout the subwords feature from repository and improve it. It has no dependencies to Code Recommenders. Thus it should work standalone from inside your IDE and should be very easy to extend. We'll be glad to support you on your extensions - and it won't get easier to contribute to an open source project than now
The sources are available in git here: http://goo.gl/V9q14
The commit log is here: http://goo.gl/gLV9r
[Updated on: Mon, 16 May 2011 20:18]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02899 seconds