Bug 57131 Remove references to AST#parseCompilationUnit from java.compare
JDT Core wants to remove the following methods (that have been deprecated for several builds now) for next integration build: - AST#parseCompilationUnit(ICompilationUnit,boolean,WorkingCopyOwner) (use ASTParser instead) - ICompilationUnit#reconcile(boolean, IProgressMonitor) (use reconcile(boolean, boolean, WorkingCopyOwner, IProgressMonitor) instead)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
case JavaNode.FIELD:
				return ASTNode.FIELD_DECLARATION;
				
			case JavaNode.INIT:
				return ASTNode.INITIALIZER;
				
			default:
				break;				
			}
		}
			
		
		Assert.isTrue(false);
		return 0;
	}
	/**
	 * Returns the index of the given node within its container.
	 * If node is null -1 is returned.
	 * @param node
	 * @return the index of the given node or -1 if the node couldn't be found
	 */
	private int getIndex(CompilationUnit root, IMember node, List container) throws JavaModelException {
		
		if (node != null) {
			ISourceRange sourceRange= node.getNameRange();
			ASTNode n= NodeFinder.perform(root, sourceRange);
			if (n != null) {
				MethodDeclaration parentNode= (MethodDeclaration)ASTNodes.getParent(n, MethodDeclaration.class);
				if (parentNode != null)
					return container.indexOf(parentNode);