Bug 40785 [plan item] Overview ruler improvements
- navigation from ruler to editor - hovering over header area shows number of errors/warning (header annotations in general)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/filebuffers/CompilationUnitDocumentProvider2.java
}
			
			cuInfo.fModel.removeAnnotationModelListener(fGlobalAnnotationModelListener);
		}
		super.disposeFileInfo(element, info);
	}
	
	/*
	 * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#saveDocument(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
	 */
	public void saveDocument(IProgressMonitor monitor, Object element, IDocument ignore, boolean overwrite) throws CoreException {
		
		FileInfo fileInfo= getFileInfo(element);		
		if (fileInfo instanceof CompilationUnitInfo) {
			CompilationUnitInfo info= (CompilationUnitInfo) fileInfo;
			
			
			info.fCopy.reconcile();
			
			ICompilationUnit original= (ICompilationUnit) info.fCopy.getOriginalElement();
			IResource resource= original.getResource();
			
			if (resource == null) {
				
				super.saveDocument(monitor, element, ignore, overwrite);
				return;
			}
				
			if (fSavePolicy != null)
				fSavePolicy.preSave(info.fCopy);