Bug 62455 Method stub for "main" interferes with main method template [code manipulation]
Build 20040513 When codeassisting behind "main", the codeassist menu incorrectly offers both a main method template and a main method stub (the latter appears first and shouldn't appear at all).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/MethodCompletionProposal.java
if (fReturnTypeSig != null) {
			buf.append(Signature.toString(fReturnTypeSig));
		}
		buf.append(' ');
		buf.append(fMethodName);
		buf.append("() {\n"); 
	
		String body= CodeGeneration.getMethodBodyContent(fType.getCompilationUnit(), declTypeName, fMethodName, fReturnTypeSig == null, "", String.valueOf('\n')); 
		if (body != null) {
			buf.append(body);
			buf.append('\n');
		}
		buf.append("}\n"); 
		String stub=  buf.toString(); 
		
		
		IRegion region= document.getLineInformationOfOffset(getReplacementOffset());
		int lineStart= region.getOffset();
		int indent= Strings.computeIndent(document.get(lineStart, getReplacementOffset() - lineStart), settings.tabWidth);
		String replacement= CodeFormatterUtil.format(CodeFormatter.K_CLASS_BODY_DECLARATIONS, stub, indent, null, lineDelim, fType.getJavaProject());
		
		if (replacement.endsWith(lineDelim)) {
			replacement= replacement.substring(0, replacement.length() - lineDelim.length());
		}
		
		setReplacementString(Strings.trimLeadingTabsAndSpaces(replacement));
		return true;
	}
}