Lines 13622-13627
Link Here
|
13622 |
/* |
13622 |
/* |
13623 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=84720 |
13623 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=84720 |
13624 |
* to test that the methods with Boxed/unboxed return types get higher relevance than the ones that return void |
13624 |
* to test that the methods with Boxed/unboxed return types get higher relevance than the ones that return void |
|
|
13625 |
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=273991 also |
13625 |
*/ |
13626 |
*/ |
13626 |
public void testCompletionWithUnboxing() throws JavaModelException { |
13627 |
public void testCompletionWithUnboxing() throws JavaModelException { |
13627 |
this.workingCopies = new ICompilationUnit[2]; |
13628 |
this.workingCopies = new ICompilationUnit[2]; |
Lines 13631-13646
Link Here
|
13631 |
"public class C {\n" + |
13632 |
"public class C {\n" + |
13632 |
"public void myMethod1(){}\n" + |
13633 |
"public void myMethod1(){}\n" + |
13633 |
"public void myMethod2(){}\n" + |
13634 |
"public void myMethod2(){}\n" + |
13634 |
"public int myMethod3(){return 0;}\n" + |
13635 |
"public long myMethod3(){return 0;}\n" + |
13635 |
"public Integer myMethod4(){return 0;}\n" + |
13636 |
"public Long myMethod4(){return 0;}\n" + |
|
|
13637 |
"public float myMethod5(){return 0;}\n" + |
13638 |
"public Float myMethod6(){return 0;}\n" + |
13639 |
"public Double myMethod7(){return 0;}\n" + |
13640 |
"public double myMethod8(){return 0;}\n" + |
13636 |
"public void foo() {\n" + |
13641 |
"public void foo() {\n" + |
13637 |
" int i = myMeth \n" + |
13642 |
" Long l = myMeth \n" + |
13638 |
"}\n" + |
13643 |
"}\n" + |
13639 |
"}"); |
13644 |
"}"); |
13640 |
this.workingCopies[1] = getWorkingCopy( |
13645 |
this.workingCopies[1] = getWorkingCopy( |
13641 |
"/Completion/src3/java/lang/Test.java", |
13646 |
"/Completion/src3/java/lang/Test.java", |
13642 |
"package java.lang;\n" + |
13647 |
"package java.lang;\n" + |
13643 |
"public class Integer {\n" + |
13648 |
"public class Long {\n" + |
13644 |
"}"); |
13649 |
"}"); |
13645 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
13650 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
13646 |
|
13651 |
|
Lines 13654-13663
Link Here
|
13654 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13659 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13655 |
"myMethod2[METHOD_REF]{myMethod2(), Ltest.C;, ()V, myMethod2, null, " + |
13660 |
"myMethod2[METHOD_REF]{myMethod2(), Ltest.C;, ()V, myMethod2, null, " + |
13656 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13661 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13657 |
"myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Integer;, myMethod4, null, " + |
13662 |
"myMethod5[METHOD_REF]{myMethod5(), Ltest.C;, ()F, myMethod5, null, " + |
|
|
13663 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13664 |
"myMethod6[METHOD_REF]{myMethod6(), Ltest.C;, ()LFloat;, myMethod6, null, " + |
13665 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13666 |
"myMethod7[METHOD_REF]{myMethod7(), Ltest.C;, ()LDouble;, myMethod7, null, " + |
13667 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13668 |
"myMethod8[METHOD_REF]{myMethod8(), Ltest.C;, ()D, myMethod8, null, " + |
13669 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13670 |
"myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()J, myMethod3, null, " + |
13658 |
(R_RESOLVED + R_INTERESTING + R_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13671 |
(R_RESOLVED + R_INTERESTING + R_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13659 |
"myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()I, myMethod3, null, " + |
13672 |
"myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Long;, myMethod4, null, " + |
13660 |
(R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
13673 |
(R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}" , |
13661 |
requestor.getResults()); |
13674 |
requestor.getResults()); |
13662 |
} |
13675 |
} |
13663 |
/* |
13676 |
/* |
Lines 13675-13681
Link Here
|
13675 |
"public int myMethod3(){return 0;}\n" + |
13688 |
"public int myMethod3(){return 0;}\n" + |
13676 |
"public Integer myMethod4(){return 0;}\n" + |
13689 |
"public Integer myMethod4(){return 0;}\n" + |
13677 |
"public void foo() {\n" + |
13690 |
"public void foo() {\n" + |
13678 |
" Integer i = myMeth \n" + |
13691 |
" int i = myMeth \n" + |
13679 |
"}\n" + |
13692 |
"}\n" + |
13680 |
"}"); |
13693 |
"}"); |
13681 |
this.workingCopies[1] = getWorkingCopy( |
13694 |
this.workingCopies[1] = getWorkingCopy( |
Lines 13696-13704
Link Here
|
13696 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13709 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13697 |
"myMethod2[METHOD_REF]{myMethod2(), Ltest.C;, ()V, myMethod2, null, " + |
13710 |
"myMethod2[METHOD_REF]{myMethod2(), Ltest.C;, ()V, myMethod2, null, " + |
13698 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13711 |
(R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13699 |
"myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()I, myMethod3, null, " + |
|
|
13700 |
(R_RESOLVED + R_INTERESTING + R_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13701 |
"myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Integer;, myMethod4, null, " + |
13712 |
"myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Integer;, myMethod4, null, " + |
|
|
13713 |
(R_RESOLVED + R_INTERESTING + R_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
13714 |
"myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()I, myMethod3, null, " + |
13702 |
(R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
13715 |
(R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
13703 |
requestor.getResults()); |
13716 |
requestor.getResults()); |
13704 |
} |
13717 |
} |