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/JavaHistoryAction.java
private JavaEditor fEditor;
	private String fTitle;
	private String fMessage;
	void init(JavaEditor editor, String text, String title, String message) {
		Assert.isNotNull(editor);
		Assert.isNotNull(title);
		Assert.isNotNull(message);
		fEditor= editor;
		fTitle= title;
		fMessage= message;
		setText(text);
		setEnabled(checkEnabled());
	}
	
	final JavaEditor getEditor() {
		return fEditor;
	}
	final public void run() {
		
		
		IJavaElement element= null;
		try {
			element= SelectionConverter.getElementAtOffset(fEditor);
		} catch (JavaModelException e) {
			
		}
		fSelection= element != null
						? new StructuredSelection(element)
						: StructuredSelection.EMPTY;