Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 135535 Details for
Bug 273991
[assist] Wrong relevance for some proposals which are not compatible with the expected type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with updated tests
bug_273991.txt (text/plain), 4.42 KB, created by
Jay Arthanareeswaran
on 2009-05-13 04:55:43 EDT
(
hide
)
Description:
Patch with updated tests
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2009-05-13 04:55:43 EDT
Size:
4.42 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java,v >retrieving revision 1.115 >diff -u -r1.115 CompletionTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 28 Apr 2009 17:46:11 -0000 1.115 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 13 May 2009 08:53:19 -0000 >@@ -13663,6 +13663,8 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=84720 > * Additional tests for bug 84720 >+ * >+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=273991 also > */ > public void testCompletionWithUnboxing_1() throws JavaModelException { > this.workingCopies = new ICompilationUnit[2]; >@@ -13672,18 +13674,21 @@ > "public class C {\n" + > "public void myMethod1(){}\n" + > "public void myMethod2(){}\n" + >- "public int myMethod3(){return 0;}\n" + >- "public Integer myMethod4(){return 0;}\n" + >+ "public long myMethod3(){return 0;}\n" + >+ "public Long myMethod4(){return 0;}\n" + >+ "public float myMethod5(){return 0;}\n" + >+ "public Float myMethod6(){return 0;}\n" + >+ "public Double myMethod7(){return 0;}\n" + >+ "public double myMethod8(){return 0;}\n" + > "public void foo() {\n" + >- " Integer i = myMeth \n" + >+ " Long l = myMeth \n" + > "}\n" + > "}"); > this.workingCopies[1] = getWorkingCopy( > "/Completion/src3/java/lang/Test.java", > "package java.lang;\n" + >- "public class Integer {\n" + >+ "public class Long {\n" + > "}"); >- > CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); > > String str = this.workingCopies[0].getSource(); >@@ -13696,10 +13701,18 @@ > (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + > "myMethod2[METHOD_REF]{myMethod2(), Ltest.C;, ()V, myMethod2, null, " + > (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >- "myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()I, myMethod3, null, " + >+ "myMethod5[METHOD_REF]{myMethod5(), Ltest.C;, ()F, myMethod5, null, " + >+ (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "myMethod6[METHOD_REF]{myMethod6(), Ltest.C;, ()LFloat;, myMethod6, null, " + >+ (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "myMethod7[METHOD_REF]{myMethod7(), Ltest.C;, ()LDouble;, myMethod7, null, " + >+ (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "myMethod8[METHOD_REF]{myMethod8(), Ltest.C;, ()D, myMethod8, null, " + >+ (R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >+ "myMethod3[METHOD_REF]{myMethod3(), Ltest.C;, ()J, myMethod3, null, " + > (R_RESOLVED + R_INTERESTING + R_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + >- "myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Integer;, myMethod4, null, " + >- (R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", >+ "myMethod4[METHOD_REF]{myMethod4(), Ltest.C;, ()Ljava.lang.Long;, myMethod4, null, " + >+ (R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}" , > requestor.getResults()); > } > /* >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.395 >diff -u -r1.395 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 27 Apr 2009 09:38:22 -0000 1.395 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 13 May 2009 08:53:29 -0000 >@@ -3979,7 +3979,7 @@ > } > // Bug 84720 - [1.5][assist] proposal ranking by return value should consider auto(un)boxing > // Just ensuring that the unitScope is not null, even though it's an unlikely case. >- if (this.unitScope != null && this.unitScope.isBoxingCompatibleWith(this.expectedTypes[i], proposalType)) { >+ if (this.unitScope != null && this.unitScope.isBoxingCompatibleWith(proposalType, this.expectedTypes[i])) { > relevance = R_EXPECTED_TYPE; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
david_audel
:
iplog+
david_audel
:
review+
Actions:
View
|
Diff
Attachments on
bug 273991
:
135101
|
135507
|
135535
|
135757