mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
preselect the most relevant item (e.g. finally>final, swing getComponents>getComponent, IDEA-82206)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
{
|
||||
try {}
|
||||
fin<caret>x
|
||||
}
|
||||
}
|
||||
+8
-4
@@ -101,7 +101,7 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
public void testDispreferImpls() throws Throwable {
|
||||
myFixture.addClass("package foo; public class Xxx {}");
|
||||
configureSecondCompletion();
|
||||
assertPreferredItems(0, "Xxx", "XxxEx", "XxxImpl", "Xxy");
|
||||
assertPreferredItems(1, "Xxx", "XxxEx", "XxxImpl", "Xxy");
|
||||
}
|
||||
|
||||
public void testPreferOwnInnerClasses() throws Throwable {
|
||||
@@ -128,7 +128,7 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
myFixture.addClass("package foo; public interface XaYa {}");
|
||||
myFixture.addClass("package foo; public interface XyYa {}");
|
||||
configureSecondCompletion();
|
||||
assertPreferredItems(0, "XaYa", "XaYaEx", "XaYaImpl", "XyYa", "XyYaXa");
|
||||
assertPreferredItems(1, "XaYa", "XaYaEx", "XaYaImpl", "XyYa", "XyYaXa");
|
||||
}
|
||||
|
||||
public void testPreferLessParameters() throws Throwable {
|
||||
@@ -218,8 +218,12 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
checkPreferredItems(0, "FooClass", "Foo_Intf");
|
||||
}
|
||||
|
||||
public void testPreferClassOverItsStaticMembers() {
|
||||
checkPreferredItems(0, "Zoo");
|
||||
public void testPreferClassStaticMembers() {
|
||||
checkPreferredItems(1, "Zoo", "Zoo.A", "Zoo.B", "Zoo.C", "Zoo.D", "Zoo.E", "Zoo.F", "Zoo.G", "Zoo.H");
|
||||
}
|
||||
|
||||
public void testPreferFinallyToFinal() {
|
||||
checkPreferredItems(1, "final", "finally");
|
||||
}
|
||||
|
||||
public void testPreferReturn() {
|
||||
|
||||
Reference in New Issue
Block a user