Bug 38481 getters/setters: insertion point incorrect
20020604 public class Ad { void f(){} int foo; int foo1; int foo2; } i seleced f() as the insert point and it added the getter after all the fields
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java
try {
			int position= 0;
			int presetOffset= 0;
			if (fEditor != null) {
				presetOffset= ((TextSelection) fEditor.getSelectionProvider().getSelection()).getOffset();
			}
			else {
				List preselected= getInitialElementSelections();	
				int size= preselected.size();
				if ((size > 1) || (size == 0))
					presetOffset= 0;		
				else {				
					IJavaElement element= (IJavaElement) preselected.get(0);
					int type= element.getElementType();					
					if (type == IJavaElement.FIELD)
						presetOffset= ((IField)element).getSourceRange().getOffset();									
					else if (type == IJavaElement.METHOD)
						presetOffset= ((IMethod)element).getSourceRange().getOffset();	
				}
			}
			
			IMethod[] methods= fType.getMethods();
			combo.add(ActionMessages.getString("SourceActionDialog.first_method")); 
			combo.add(ActionMessages.getString("SourceActionDialog.last_method")); 
							
			int bestDiff= Integer.MAX_VALUE;
			
			for (int i= 0; i < methods.length; i++) {
				int currDiff= 0;
				IMethod curr= methods[i];