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 172729 Details for
Bug 316937
JavaElement.getElementInfo(..) throws JavaModelException when trying to get info for an inner class in an external jar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Modified patch
bug_316937.txt (text/plain), 2.93 KB, created by
Jay Arthanareeswaran
on 2010-06-25 05:47:13 EDT
(
hide
)
Description:
Modified patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-06-25 05:47:13 EDT
Size:
2.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java,v >retrieving revision 1.14 >diff -u -r1.14 InternalCompletionProposal.java >--- codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java 22 Jan 2009 09:46:59 -0000 1.14 >+++ codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java 25 Jun 2010 09:45:11 -0000 >@@ -311,7 +311,25 @@ > for(int i = 0; i< length ; i++){ > args[i] = new String(paramTypeNames[i]); > } >- IMethod method = type.getMethod(new String(selector),args); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316937 >+ // BinaryType#getMethod() creates a new instance of BinaryMethod, which is a dummy. >+ // Instead use IType#findMethods() to get a handle to the method. >+ IMethod method = null; >+ { >+ IType enclosingType = type.getDeclaringType(); >+ if (enclosingType != null && CharOperation.equals(type.getElementName().toCharArray(), selector)) { >+ String[] newArgs = new String[length + 1]; >+ newArgs[0] = Signature.createTypeSignature(enclosingType.getFullyQualifiedName(), true); >+ System.arraycopy(args, 0, newArgs, 1, length); >+ method = type.getMethod(new String(selector), newArgs); >+ } else { >+ method = type.getMethod(new String(selector), args); >+ } >+ IMethod[] methods = type.findMethods(method); >+ if (methods != null && methods.length > 0) { >+ method = methods[0]; >+ } >+ } > try{ > parameters = new char[length][]; > String[] params = method.getParameterNames(); >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.105 >diff -u -r1.105 BinaryMethod.java >--- model/org/eclipse/jdt/internal/core/BinaryMethod.java 7 Mar 2009 00:58:57 -0000 1.105 >+++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 25 Jun 2010 09:45:12 -0000 >@@ -181,7 +181,10 @@ > > // try to see if we can retrieve the names from the attached javadoc > IBinaryMethod info = (IBinaryMethod) getElementInfo(); >- final int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor())); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316937 >+ // Use Signature#getParameterCount() only if the argument names are not already available. >+ final int paramCount = info.getArgumentNames() == null ? info.getArgumentNames().length : >+ Signature.getParameterCount(new String(info.getMethodDescriptor())); > if (paramCount != 0) { > // don't try to look for javadoc for synthetic methods > int modifiers = getFlags();
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 316937
:
171960
|
172479
|
172729
|
172890
|
175894
|
177811