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 202006 Details for
Bug 354766
Javadoc content does not appear in content assist info window for non-static inner class constructors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for MethodProposalInfo
patch.txt (text/plain), 4.83 KB, created by
Markus Keller
on 2011-08-23 10:44:46 EDT
(
hide
)
Description:
patch for MethodProposalInfo
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2011-08-23 10:44:46 EDT
Size:
4.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java,v >retrieving revision 1.14 >diff -u -r1.14 MethodProposalInfo.java >--- ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java 1 Mar 2011 11:50:36 -0000 1.14 >+++ ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java 23 Aug 2011 14:43:06 -0000 >@@ -14,6 +14,7 @@ > import java.util.Map; > > import org.eclipse.jdt.core.CompletionProposal; >+import org.eclipse.jdt.core.Flags; > import org.eclipse.jdt.core.IJavaProject; > import org.eclipse.jdt.core.IMember; > import org.eclipse.jdt.core.IMethod; >@@ -90,7 +91,7 @@ > */ > private IMethod findMethod(String name, String[] paramTypes, boolean isConstructor, IType type) throws JavaModelException { > Map<String, char[]> typeVariables= computeTypeVariables(type); >- return findMethod(name, paramTypes, isConstructor, type.getMethods(), typeVariables); >+ return findMethod(name, paramTypes, isConstructor, type, typeVariables); > } > > /** >@@ -142,14 +143,15 @@ > * @param paramTypes The type signatures of the parameters e.g. > * <code>{"QString;","I"}</code> > * @param isConstructor If the method is a constructor >- * @param methods The methods to search in >+ * @param type the given type in which to search for methods > * @param typeVariables a map from type variables to concretely used types > * @return The found method or <code>null</code>, if nothing found > * @throws JavaModelException if the method does not exist or if an exception occurs while accessing its corresponding resource > */ >- private IMethod findMethod(String name, String[] paramTypes, boolean isConstructor, IMethod[] methods, Map<String, char[]> typeVariables) throws JavaModelException { >+ private IMethod findMethod(String name, String[] paramTypes, boolean isConstructor, IType type, Map<String, char[]> typeVariables) throws JavaModelException { >+ IMethod[] methods = type.getMethods(); > for (int i= methods.length - 1; i >= 0; i--) { >- if (isSameMethodSignature(name, paramTypes, isConstructor, methods[i], typeVariables)) { >+ if (isSameMethodSignature(name, paramTypes, isConstructor, methods[i], typeVariables, type)) { > return methods[i]; > } > } >@@ -167,15 +169,21 @@ > * @param isConstructor Specifies if the method is a constructor > * @param method the method to be compared with this info's method > * @param typeVariables a map from type variables to types >+ * @param type the given type that declares the method > * @return Returns <code>true</code> if the method has the given name and > * parameter types and constructor state. > * @throws JavaModelException if the method does not exist or if an exception occurs while accessing its corresponding resource > */ >- private boolean isSameMethodSignature(String name, String[] paramTypes, boolean isConstructor, IMethod method, Map<String, char[]> typeVariables) throws JavaModelException { >+ private boolean isSameMethodSignature(String name, String[] paramTypes, boolean isConstructor, IMethod method, Map<String, char[]> typeVariables, IType type) throws JavaModelException { > if (isConstructor || name.equals(method.getElementName())) { > if (isConstructor == method.isConstructor()) { > String[] otherParams= method.getParameterTypes(); // types may be type variables >- if (paramTypes.length == otherParams.length) { >+ boolean isBinaryConstructorForNonStaticMemberClass= >+ method.isBinary() >+ && type.isMember() >+ && !Flags.isStatic(type.getFlags()); >+ int syntheticParameterCorrection= isBinaryConstructorForNonStaticMemberClass ? 1 : 0; >+ if (paramTypes.length == otherParams.length - syntheticParameterCorrection) { > fFallbackMatch= method; > String signature= method.getSignature(); > String[] otherParamsFromSignature= Signature.getParameterTypes(signature); // types are resolved / upper-bounded >@@ -183,9 +191,9 @@ > // not yet bound when proposing a method > for (int i= 0; i < paramTypes.length; i++) { > String ourParamName= computeSimpleTypeName(paramTypes[i], typeVariables); >- String otherParamName1= computeSimpleTypeName(otherParams[i], typeVariables); >- String otherParamName2= computeSimpleTypeName(otherParamsFromSignature[i], typeVariables); >- >+ String otherParamName1= computeSimpleTypeName(otherParams[i + syntheticParameterCorrection], typeVariables); >+ String otherParamName2= computeSimpleTypeName(otherParamsFromSignature[i + syntheticParameterCorrection], typeVariables); >+ > if (!ourParamName.equals(otherParamName1) && !ourParamName.equals(otherParamName2)) { > return false; > }
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 354766
:
201749
|
201750
|
201751
|
201752
|
201753
|
201974
|
202006
|
202008
|
202020
|
206108
|
206119