ICompilationUnit original= (ICompilationUnit) info.fCopy.getOriginalElement();  fireElementContentAboutToBeReplaced(element);  removeUnchangedElementListeners(element, info); info.fDocument.set(original.getSource()); info.fCanBeSaved= false; addUnchangedElementListeners(element, info);  fireElementContentReplaced(element);  } catch (JavaModelException x) { throw new CoreException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_RESOURCE, x)); }
} catch (CoreException x) { document= new Document(); status= x.getStatus();
	public void resetDocument(Object element) throws CoreException {		if (element == null)			return;					ElementInfo elementInfo= getElementInfo(element);				if (elementInfo instanceof CompilationUnitInfo) {			CompilationUnitInfo info= (CompilationUnitInfo) elementInfo;			if (info.fCanBeSaved) {				try {										ICompilationUnit original= (ICompilationUnit) info.fCopy.getOriginalElement();										fireElementContentAboutToBeReplaced(element);										removeUnchangedElementListeners(element, info);					info.fDocument.set(original.getSource());					info.fCanBeSaved= false;					addUnchangedElementListeners(element, info);										fireElementContentReplaced(element);									} catch (JavaModelException x) {					throw new CoreException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_RESOURCE, x));				}			}		} else {			super.resetDocument(element);		}	}