Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] Plan for type proposals for subwords completion

Hi Steve,

On 16.12.2011, at 07:17, Steve Ash wrote:

I am hoping to have some time this weekend to jump into the subwords completion code and take a stab at type completion (https://bugs.eclipse.org/bugs/show_bug.cgi?id=366402).  

Sounds good.

I also want to evaluate and think about the subword weighting (https://bugs.eclipse.org/bugs/show_bug.cgi?id=346947)

We are still blocked by the mentioned JDT bug.  I'm not sure you are aware of the detail already. Sorry if this is a repetition:
The issue is not so much about computing *any score* but *updating the score* the more you type. Assume you trigger code completion on "x.get|". If you add more an more letters to the prefix (with an open completion window), the proposal ordering still stays the same although the better matching proposals should go up now. The mentioned JDT bug is about running a reordering after each new character.


A few weeks ago (though I can't find the emails) you mentioned that you had some ideas to discuss type proposals in subwords completion.  I see that https://bugs.eclipse.org/bugs/show_bug.cgi?id=340945 has been completed (despite a bug in the non-default proposals).  So what do you think?  Use that to provide some filtering of a call to org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames as described in ()?

The new context is no alternative to SearchEngine.searchAllTypeNames. We still have to use the search engine for that.


I haven't looked too hard at the eclipse APIs yet, but this seems fairly straight forward -- do you know if searchAllTypeNames takes any kind of criteria to reduce the search space? Or do I need to do filtering after the fact?

Search can be limited to types available on the classpath of the project. I think there is (conceptually) not more you can do but it should suffice.

Lastly, today when I run subwords completion I still need to keep java proposals turned on otherwise I don't get types all the time (obviously).  But when its on I get duplicate entries in my suggestions list.  Is this a required consequence?  Or do you know if there is some way of easily preventing this?  Or do we just think that once subwords completion is complete that it wont matter as user will just disable java proposals?

It's a necessary but unwanted fact. If you trigger code completion and continue typing with an open completion window, we can narrow down the completions the more you type. JDT does not trigger new completion requests but just filters the existing ones (using #isPrefix methods in the proposals). Because of that, we have to give all completions that match the initial completion event - even if they are already covered by JDT default completion.


Also as a future effort have you thought any about the HMM model proposed by Sangmok in the videos you posted on the blog?  This also seems very useful and I swear intelliJ is doing something similar.  I seem to remember it resorting based on my habits.  Even just sorting based on simple probabilities might be interesting.

I thought about it. Sangmok agreed on implementing this for Eclipse some time ago but it seems he has much work to do with his PhD. There are no plans to go for this until Juno release. However, if someone else is going for it, we would support this.


Thanks,
Marcel



Back to the top