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 183813 Details for
Bug 299384
codeSelect does not find declaration of constructor with generic parameter type when referenced from 1.4 code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch incorporating suggestions from comment#21
patch.txt (text/plain), 3.63 KB, created by
Srikanth Sankaran
on 2010-11-24 18:25:46 EST
(
hide
)
Description:
Patch incorporating suggestions from comment#21
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2010-11-24 18:25:46 EST
Size:
3.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/BinaryMethod.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java,v >retrieving revision 1.107 >diff -u -r1.107 BinaryMethod.java >--- model/org/eclipse/jdt/internal/core/BinaryMethod.java 7 Sep 2010 03:17:29 -0000 1.107 >+++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 24 Nov 2010 23:24:26 -0000 >@@ -32,6 +32,8 @@ > * parameters. > */ > protected String[] parameterTypes; >+ protected String [] erasedParamaterTypes; // lazily initialized via call to getErasedParameterTypes >+ > /** > * The parameter names for the method. > */ >@@ -52,7 +54,7 @@ > } > public boolean equals(Object o) { > if (!(o instanceof BinaryMethod)) return false; >- return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((BinaryMethod)o).parameterTypes); >+ return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes()); > } > public IAnnotation[] getAnnotations() throws JavaModelException { > IBinaryMethod info = (IBinaryMethod) getElementInfo(); >@@ -372,6 +374,23 @@ > return this.parameterTypes; > } > >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=299384 >+private String [] getErasedParameterTypes() { >+ if (this.erasedParamaterTypes == null) { >+ int paramCount = this.parameterTypes.length; >+ this.erasedParamaterTypes = new String [paramCount]; >+ for (int i = 0; i < paramCount; i++) { >+ String parameterType = this.parameterTypes[i]; >+ this.erasedParamaterTypes[i] = parameterType.indexOf(Signature.C_GENERIC_START, 0) >= 0 ? >+ new String(Signature.getTypeErasure(parameterType.toCharArray())) : parameterType; >+ } >+ } >+ return this.erasedParamaterTypes; >+} >+private String getErasedParameterType(int index) { >+ return getErasedParameterTypes()[index]; >+} >+ > public ITypeParameter getTypeParameter(String typeParameterName) { > return new TypeParameter(this, typeParameterName); > } >@@ -446,7 +465,7 @@ > public int hashCode() { > int hash = super.hashCode(); > for (int i = 0, length = this.parameterTypes.length; i < length; i++) { >- hash = Util.combineHashCodes(hash, this.parameterTypes[i].hashCode()); >+ hash = Util.combineHashCodes(hash, getErasedParameterType(i).hashCode()); > } > return hash; > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests.java,v >retrieving revision 1.95 >diff -u -r1.95 ResolveTests.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests.java 19 Nov 2010 14:21:59 -0000 1.95 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests.java 24 Nov 2010 23:24:28 -0000 >@@ -2610,7 +2610,7 @@ > ); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=299384 >-public void _testCodeSelectInHybrid1415Projects() throws CoreException, IOException { >+public void testCodeSelectInHybrid1415Projects() throws CoreException, IOException { > String jarName = "bug299384.jar"; > String srcName = "bug299384_src.zip"; > try { >@@ -2641,7 +2641,7 @@ > > assertElementsEqual( > "Unexpected elements", >- "TestSuite(java.lang.Class<? extends TestCase>) [in TestSuite [in TestSuite.class [in <default> [in bug299384.jar [in Resolve]]]]]", >+ "TestSuite(java.lang.Class) [in TestSuite [in TestSuite.class [in <default> [in bug299384.jar [in Resolve]]]]]", > elements > ); > } finally {
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 299384
:
182269
|
183661
|
183675
|
183813
|
183819