Bug 95785 [5.0] Content assist for Collection#toArray(T[]) does not show additional info
N20050518-0010 (also with HEAD of JDT/UI and JDT/Core) - have 'Fill argument names on completion' and 'Guess filled method arguments' enabled - in the method below (in a 5.0 project), execute contant assist after toArray and choose "toArray(Object[] a)": public void test(java.util.List aList){ aList.toArray } => There's not javadoc for this method => the line now reads: aList.toArray(toarray - convert collection to array) - changing the parameter type to List<Object> splits the proposal in two and emits a beep when the proposals are inserted: - toArray(T[]) T[] - Collection - toArray(T[]) T[] - List => Expected: only the one from List is proposed; no beep.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java
return findMethod(name, parameters, isConstructor, type);
		}
		return null;
	}
	
	/**
	 * Finds a method in a type. This searches for a method with the same name
	 * and signature. Parameter types are only compared by the simple name, no
	 * resolving for the fully qualified type name is done. Constructors are
	 * only compared by parameters, not the name.
	 *
	 * @param name The name of the method to find
	 * @param paramTypes The type signatures of the parameters e.g.
	 *        <code>{"QString;","I"}</code>
	 * @param isConstructor If the method is a constructor
	 * @return The first found method or <code>null</code>, if nothing found
	 */
	private IMethod findMethod(String name, String[] paramTypes, boolean isConstructor, IType type) throws JavaModelException {
		Map typeVariables= computeTypeVariables(type);
		return findMethod(name, paramTypes, isConstructor, type.getMethods(), typeVariables);
	}
	/**
	 * The type and method signatures received in
	 * <code>CompletionProposals</code> of type <code>METHOD_REF</code>
	 * contain concrete type bounds. When comparing parameters of the signature
	 * with an <code>IMethod</code>, we have to make sure that we match the
	 * case where the formal method declaration uses a type variable which in
	 * the signature is already substituted with a concrete type (bound).
	 * <p>
	 * This method creates a map from type variable names to type signatures