Bug 46805 prepare Compare for encoding support
I20031111 The Compare plugin only supports the global workspace encoding. It does not support encodings per file.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
ASTNode n= NodeFinder.perform(root, sourceRange);
			if (n != null) {
				BodyDeclaration parentNode= (BodyDeclaration)ASTNodes.getParent(n, BodyDeclaration.class);
				if (parentNode != null)
					return ((TypeDeclaration)parentNode).bodyDeclarations();
			}
			return null;
		}
			
		return null;
	}
	
	/**
	 * Returns the corresponding place holder type for the given element.
	 * @return a place holder type (see ASTRewrite)
	 */
	private int getPlaceHolderType(ITypedElement element) {
		
		if (element instanceof DocumentRangeNode) {
			JavaNode jn= (JavaNode) element;
			switch (jn.getTypeCode()) {
				
			case JavaNode.CLASS:
			case JavaNode.INTERFACE:
				return ASTRewrite.TYPE_DECLARATION;
				
			case JavaNode.CONSTRUCTOR:
			case JavaNode.METHOD:
				return ASTRewrite.METHOD_DECLARATION;