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/GetterSetterCompletionProposal.java
IField[] fields= type.getFields();
		IMethod[] methods= type.getMethods();
		for (int i= 0; i < fields.length; i++) {
			IField curr= fields[i];
			String getterName= GetterSetterUtil.getGetterName(curr, null);
			if (getterName.startsWith(prefix) && !hasMethod(methods, getterName)) {
				result.add(new GetterSetterCompletionProposal(curr, offset, length, true, relevance));
			}
				
			String setterName= GetterSetterUtil.getSetterName(curr, null);
			if (setterName.startsWith(prefix) && !hasMethod(methods, setterName)) {
				result.add(new GetterSetterCompletionProposal(curr, offset, length, false, relevance));
			}
		}
	}
	
	private static boolean hasMethod(IMethod[] methods, String name) {
		for (int i= 0; i < methods.length; i++) {
			if (methods[i].getElementName().equals(name)) {
				return true;
			}
		}
		return false;
	}
	
	private final IField fField;
	private final boolean fIsGetter;
	public GetterSetterCompletionProposal(IField field, int start, int length, boolean isGetter, int relevance) throws JavaModelException {
		super("", field.getCompilationUnit(), start, length, JavaPluginImages.get(JavaPluginImages.IMG_MISC_PUBLIC), getDisplayName(field, isGetter), relevance);