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 39173 Details for
Bug 95829
[assist] toArray proposed twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Better fix
patch004.txt (text/plain), 4.83 KB, created by
David Audel
on 2006-04-21 11:47:31 EDT
(
hide
)
Description:
Better fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-04-21 11:47:31 EDT
Size:
4.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.286 >diff -u -r1.286 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 19 Apr 2006 13:33:37 -0000 1.286 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 21 Apr 2006 14:22:04 -0000 >@@ -3903,7 +3903,7 @@ > continue next; > > if (CharOperation.equals(method.selector, otherMethod.selector, true) >- && method.areParametersEqual(otherMethod)) { >+ && lookupEnvironment.methodVerifier().doesMethodOverride(otherMethod, method)) { > > if (method.declaringClass.isSuperclassOf(otherMethod.declaringClass)) > continue next; >@@ -4404,7 +4404,7 @@ > continue next; > > if (CharOperation.equals(method.selector, otherMethod.selector, true) >- && method.areParametersEqual(otherMethod)) { >+ && lookupEnvironment.methodVerifier().doesMethodOverride(otherMethod, method)) { > continue next; > } > } >#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.65 >diff -u -r1.65 CompletionTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 19 Apr 2006 13:33:19 -0000 1.65 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 21 Apr 2006 14:22:14 -0000 >@@ -8659,4 +8659,77 @@ > "ZZZNeedsImportEnum[TYPE_REF]{ZZZNeedsImportEnum, pack, Lpack.ZZZNeedsImportEnum;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", > requestor.getResults()); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95829 >+public void test0286() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[3]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;\n"+ >+ "public class Test {\n"+ >+ " void bar(Test2<Object> t) {\n"+ >+ " t.fo\n"+ >+ " }\n"+ >+ "}\n"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Completion/src/test/Test1.java", >+ "package test;\n"+ >+ "public interface Test1<U> {\n"+ >+ " <T> T[] foo(T[] t);\n"+ >+ "}\n"); >+ >+ this.workingCopies[2] = getWorkingCopy( >+ "/Completion/src/test/Test2.java", >+ "package test;\n"+ >+ "public interface Test2<U> extends Test1<U> {\n"+ >+ " <T> T[] foo(T[] t);\n"+ >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "t.fo"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "foo[METHOD_REF]{foo(), Ltest.Test2<Ljava.lang.Object;>;, <T:Ljava.lang.Object;>([TT;)[TT;, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95829 >+public void test0287() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[3]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Completion/src/test/Test.java", >+ "package test;\n"+ >+ "public class Test implements Test2<Object>{\n"+ >+ " fo\n"+ >+ "}\n"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Completion/src/test/Test1.java", >+ "package test;\n"+ >+ "public interface Test1<U> {\n"+ >+ " <T> T[] foo(T[] t);\n"+ >+ "}\n"); >+ >+ this.workingCopies[2] = getWorkingCopy( >+ "/Completion/src/test/Test2.java", >+ "package test;\n"+ >+ "public interface Test2<U> extends Test1<U> {\n"+ >+ " <T> T[] foo(T[] t);\n"+ >+ "}\n"); >+ >+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); >+ >+ String str = this.workingCopies[0].getSource(); >+ String completeBehind = "fo"; >+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); >+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); >+ >+ assertResults( >+ "fo[POTENTIAL_METHOD_DECLARATION]{fo, Ltest.Test;, ()V, fo, null, " + (R_DEFAULT + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + >+ "foo[METHOD_DECLARATION]{public <T> T[] foo(T[] t), Ltest.Test2<Ljava.lang.Object;>;, <T:Ljava.lang.Object;>([TT;)[TT;, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_METHOD_OVERIDE + R_ABSTRACT_METHOD + R_NON_RESTRICTED) + "}", >+ requestor.getResults()); >+} > }
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
Actions:
View
|
Diff
Attachments on
bug 95829
:
38932
| 39173