Bug 62794 Stub on code assist: Should check if method name is valid Java id
20040518 - between two method, enter 'while' press code assist - proposal is to create method 'while' created method is of course invalid -> should check if method name is not a keyword
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/MethodCompletionProposal.java
private final String fReturnTypeSig;
	private final String fMethodName;
	public MethodCompletionProposal(IType type, String methodName, String returnTypeSig, int start, int length, int relevance) {
		super("", type.getCompilationUnit(), start, length, null, getDisplayName(methodName, returnTypeSig), relevance); 
		Assert.isNotNull(type);
		Assert.isNotNull(methodName);
		
		fType= type;
		fMethodName= methodName;
		fReturnTypeSig= returnTypeSig;
		
		if (returnTypeSig == null) {
			setProposalInfo(new ProposalInfo(type));
			ImageDescriptor desc= new JavaElementImageDescriptor(JavaPluginImages.DESC_MISC_PUBLIC, JavaElementImageDescriptor.CONSTRUCTOR, JavaElementImageProvider.SMALL_SIZE);
			setImage(JavaPlugin.getImageDescriptorRegistry().get(desc));
		} else {
			setImage(JavaPluginImages.get(JavaPluginImages.IMG_MISC_PRIVATE));
		}
	}
	
	private static String getDisplayName(String methodName, String returnTypeSig) {
		StringBuffer buf= new StringBuffer();
		buf.append(methodName);
		buf.append('(');
		buf.append(')');
		if (returnTypeSig != null) {
			buf.append("  "); 
			buf.append(Signature.toString(returnTypeSig));
			buf.append(" - "); 
			buf.append(JavaTextMessages.getString("MethodCompletionProposal.method.label"));