Bug 6828 Support with replace with previous
This is likely a dup, but filed as a reminder. The replace from local history action should provide a replace with previous action.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
*/
	private TextEdit createEdit(String[] lines, IParent container) {
		
		
		IJavaElement[] children= null;
		try {
			children= container.getChildren();
		} catch(JavaModelException ex) {
		}
		if (children != null) {
			IJavaElement candidate= null;
			for (int i= 0; i < children.length; i++) {
				IJavaElement chld= children[i];
				
				switch (chld.getElementType()) {
				case IJavaElement.PACKAGE_DECLARATION:
				case IJavaElement.IMPORT_CONTAINER:
					
					candidate= chld;
					continue;
				default:
					return new MemberEdit(chld, MemberEdit.INSERT_BEFORE, lines,
											CodeFormatterPreferencePage.getTabSize());
				}
			}
			if (candidate != null)
				return new MemberEdit(candidate, MemberEdit.INSERT_AFTER, lines,
											CodeFormatterPreferencePage.getTabSize());
		}