Community
Participate
Working Groups
Since Mars the code completion also includes items, that not necessarily begin with what I already typed, but contain sub tokens. This is nice. But those starting with what I already typed should be sorted up, which is very likely what I want to be completed. Code to reproduce: ##################################### class X { static void setVisible( boolean visible ) {} static String getAJAXFooBar_setVisibility() { return ( "" ); } } class Y { void main( String[] args ) { X.setVis| } } ##################################### Having the caret at the pipe's location with code completion active, the getAJAXFooBar_setVisibility() method is included in the list, which is great, but is sorted to the top, which is bad. Much more likely will be the setVisibile() method to be typed and completed.
The completion engine also doesn't learn at all (never) and doesn't get, that I want the setVisible() method in 99% of cases.
I cannot reproduce this with Eclipse Neon 4.6 (I20160606-1100). #setVisible is proposed at the top in the given example. Please check with the 4.6 build without any additional plug-ins and provide exact steps and code snippet to reproduce the issue.
I checked it with a fresh Neon with only Subclipse installed. And it is the same. Though you need to precisely follow these steps. Create a class A: ######################### public class A { public void setVisibile( boolean visible ) { } public String getAJAXResonseCode_setVisibility() { return ( null ); } } ######################### From somewhere else like a class B next to A type: new A().setvisi getAJAXResonseCode_setVisibility() will be first in the list of proposals. If you hit escape and then CTRL+space to get the proposals back, the order will be different. setVisible will be on top now, which would be correct at least in this small example. So it makes a difference, whether you're typing it from the dot on or you hit CRTL+space. If you type the V in upper case like this: new A().setVisi The order will be correct, too. Shouldn't case only make a difference, if it is the last criterion (and everything else is the same)?
I do not see these issues in Eclipse 4.6 downloaded from: http://download.eclipse.org/eclipse/downloads/drops4/R-4.6-201606061100/ It does not have Subclipse installed. Please try with the above and let us know if you can reproduce.
Ok, I tried your build. And the bug indeed isn't there. So I tried to the standard Eclipse build for Java developers with no additional plugins. At first the bug wasn't there. When I enabled Code Recommenders (for Java) extension then wrong sorting showed up. I fiddled around a bit with the configuration for this extension. And if I untick the "Subwords-completion processor", the sorting is as it should be. Strangely subwords are still included in the list. It's just as expected with this option unticked. So the bug seems to be in Code Recommenders For Java extension. Should I open a new ticket? Or is it still well suited here?
Moving this bug to Code Recommenders.
(In reply to Noopur Gupta from comment #6) > Moving this bug to Code Recommenders. Thanks, Noopur. (In reply to Marvin Fröhlich from comment #3) > I checked it with a fresh Neon with only Subclipse installed. And it is the > same. Though you need to precisely follow these steps. > > Create a class A: > > ######################### > public class A > { > public void setVisibile( boolean visible ) > { > } > > public String getAJAXResonseCode_setVisibility() > { > return ( null ); > } > } > ######################### > > From somewhere else like a class B next to A type: > > new A().setvisi > > getAJAXResonseCode_setVisibility() will be first in the list of proposals. > > If you hit escape and then CTRL+space to get the proposals back, the order > will be different. setVisible will be on top now, which would be correct at > least in this small example. So it makes a difference, whether you're typing > it from the dot on or you hit CRTL+space. Marvin, thank you for your detailed steps to reproduce, although it still took some interpreting to be able to trigger the bug: If you type "new().<ctrl+space>setvisi" (with a lowercase V) *then* getAJAXResonseCode_setVisibility will be shown first as soon as enter the 'v' character. Is this the scenario you had in mind? If so, then this sounds like Bug 495980, which has been fixed already in Code Recommenders 2.4.2. Indeed, I have just verified that version 2.4.2 doesn't exhibit the above problem anymore. FYI, Code Recommenders version 2.4.2 will be part of Eclipse Neon.1 in a few weeks. In the meantime, you can install it from our update site [1]. Hope this helps. [1] <http://download.eclipse.org/recommenders/updates/stable/> *** This bug has been marked as a duplicate of bug 495980 ***
Yes, this was exactly my scenario. And the patch indeed fixed the bug. Thanks a lot. I will try to be more exact in my next bug report. ;-)
(In reply to Marvin Fröhlich from comment #8) > I will try to be more exact in my next bug report. ;-) Don't get me wrong. Your bug report enabled me to reproduce in a couple of minutes rather than hours or not at all. That helps a lot, even if some minor details were unclear. Anyway, glad that we squashed this bug already.