Bug 64971 Code manipulation actions - insertion point after an existing method will insert at the end instead
I am using Generate Delegate Methods. I want to specify the position of the newly generated methods. Any combination for insertion point works (cursor position, at the beginning, at the end) except when I want to insert the new methods after any existing method. If I choose this option they will get positioned at the end of the file rather than being located after the method I chose in the dialog. Build id: 200405290105
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java
fCommentString= ActionMessages.getString("SourceActionDialog.createMethodComment"); 
		fWidth= 60;
		fHeight= 18;
			
		int insertionDefault= isConstructor ? 0 : 1;
		boolean generateCommentsDefault= JavaPreferencesSettings.getCodeGenerationSettings().createComments;
		
		IDialogSettings dialogSettings= JavaPlugin.getDefault().getDialogSettings();
		String sectionId= isConstructor ? SETTINGS_SECTION_CONSTRUCTORS : SETTINGS_SECTION_METHODS;
		fSettings= dialogSettings.getSection(sectionId);		
		if (fSettings == null)  {
			fSettings= dialogSettings.addNewSection(sectionId);
		}	
		
		fVisibilityModifier= asInt(fSettings.get(SETTINGS_VISIBILITY_MODIFIER), Modifier.PUBLIC);
		fFinal= asBoolean(fSettings.get(SETTINGS_FINAL_MODIFIER), false);
		fSynchronized= asBoolean(fSettings.get(SETTINGS_SYNCHRONIZED_MODIFIER), false);
		fCurrentPositionIndex= asInt(fSettings.get(SETTINGS_INSERTPOSITION), insertionDefault);
		fGenerateComment= asBoolean(fSettings.get(SETTINGS_COMMENTS), generateCommentsDefault);
		
		fInsertPositions= new ArrayList();
		fLabels= new ArrayList(); 
		
		IJavaElement[] members= fType.getChildren();
		IMethod[] methods= fType.getMethods();
		
		fInsertPositions.add(methods.length > 0 ? methods[0]: null); 
		fInsertPositions.add(null); 
		
		fLabels.add(ActionMessages.getString("SourceActionDialog.first_method"));