Bug 26035 Local history uses wrong character encoding
i set the windows->preferences->editors->TextFileEncoding to GBK it a Chinese charactor set.and then i wrote some Chinese in the println method just as System.out.println("2UEU"); after some modify,i replace this code back from Local History.a mistake appeared.it left a mess in the println sentence.the same mistake appear in WebSphere Application Developer 5.0
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryAction.java
* Returns true if the given file is open in an editor.
	 */
	boolean beingEdited(IFile file) {
		CompilationUnitDocumentProvider dp= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
		FileEditorInput input= new FileEditorInput(file);	
		return dp.getDocument(input) != null;
	}
	/**
	 * Returns an IMember or null.
	 */
	IMember getEditionElement(ISelection selection) {
		
		if (selection instanceof IStructuredSelection) {
			IStructuredSelection ss= (IStructuredSelection) selection;
			if (ss.size() == 1) {
				Object o= ss.getFirstElement();
				if (o instanceof IMember) {
					IMember m= (IMember) o;
					if (m.exists() && !m.isBinary() && JavaStructureCreator.hasEdition(m))
						return m;
				}
			}
		}
		return null;
	}
	
	protected boolean isEnabled(IFile file) {
		if (file == null)
			return false;
		return !(fModifiesFile && file.isReadOnly());