setInsertionIndex(combo.getSelectionIndex());
setInsertPosition(combo.getSelectionIndex());
	private void fillWithPossibleInsertPositions(Combo combo) {		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")); //$NON-NLS-1$			combo.add(ActionMessages.getString("SourceActionDialog.last_method")); //$NON-NLS-1$										int bestDiff= Integer.MAX_VALUE;						for (int i= 0; i < methods.length; i++) {				int currDiff= 0;				IMethod curr= methods[i];				combo.add(JavaElementLabels.getElementLabel(methods[i], JavaElementLabels.M_PARAMETER_TYPES));				// calculate method to pre-select				currDiff= presetOffset - curr.getSourceRange().getOffset();				if (currDiff >= 0)					if(currDiff < bestDiff) {						bestDiff= currDiff;						position= i + 2;	// first two entries are first/last					}					else						break;			}				// Add persistence only if first or last method: http://bugs.eclipse.org/bugs/show_bug.cgi?id=38400			int index= getContentProvider().getInsertPosition();			if ((index == 0) || (index == 1))				combo.select(index);			else							combo.select(position);			setInsertionIndex(combo.getSelectionIndex());		} catch (JavaModelException e) {		}		}