This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Feb 6, 2013 9:00 PM by Peter Gromov  
Anthony Lovell Newbie 15 posts since
Nov 25, 2007
Currently Being Moderated

Feb 6, 2013 12:03 AM

Auto-Complete sort logic... how to make it "dumber"?

I am doing things such as cmd+N to find and open a class by typing its name, and find the excessively clever logic in how results are sorted a source of aggravation.

 

Specifically, the drop-down box makes it easier to select classes whose name match my input less strongly than other candidates

 

For instance, if I have classes named FooBar34 and Foo34, but when I hit cmd+N and type "Foo3", it lists Foo34 and FooBar34, but has FooBar34 highlighted.  How can I get IDEA to always prefer those candidates that actually match my input by the simplest test -- that their initial sequence matches my input exactly?

 

tone

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 6, 2013 12:17 AM in response to: Anthony Lovell
Re: Auto-Complete sort logic... how to make it "dumber"?

Unfortunately currently there's no way to tweak that logic.

 

Have you chosen FooBar34 recently? Does it reside in the same module you are, Foo34 being in another module? Is FooBar34 somehow related to the file you have open in the editor right now (e.g. imported, a superclass)?

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 6, 2013 12:41 AM in response to: Anthony Lovell
Re: Auto-Complete sort logic... how to make it "dumber"?

I've reproduced this and created a bug request which you may watch: http://youtrack.jetbrains.com/issue/IDEA-100518

Thanks for the feedback!

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 6, 2013 1:11 AM in response to: Anthony Lovell
Re: Auto-Complete sort logic... how to make it "dumber"?

Well, I was a bit fast with reproducing. Could you please perform a simle test?

Go somewhere, invoke Goto Class, enter Foo23, observe FooBar23 selected, choose Foo23 explicitly. Then return back and repeat this 4 more times. Re-entering Foo23 might be not necessary if it's already there. Is the preselection changed to Foo23 after that?

Peter Gromov Apprentice 726 posts since
Sep 12, 2002
Currently Being Moderated
Feb 6, 2013 9:00 PM in response to: Anthony Lovell
Re: Auto-Complete sort logic... how to make it "dumber"?

It's not that simple. If you entered Foo23 and actually chose Foobar23, it's quite likely that the next time you enter Foo23 you'll also intend to open Foobar23 (maybe you just always forget that Foo23 exists). Or not?

More Like This

  • Retrieving data ...