Bug 68586 [implementation] Reconciling should be more robust
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
try  {
			    cuInfo.fCopy.discardWorkingCopy();
			} catch (JavaModelException x)  {
			    handleCoreException(x, x.getMessage());
			}			
			
			if (cuInfo.fModel != null)
				cuInfo.fModel.removeAnnotationModelListener(fGlobalAnnotationModelListener);
		}
		super.disposeFileInfo(element, info);
	}
	
	protected void commitWorkingCopy(IProgressMonitor monitor, Object element, CompilationUnitInfo info, boolean overwrite) throws CoreException {
		
		synchronized (info.fCopy) {
			info.fCopy.reconcile();
		}
		
		IDocument document= info.fTextFileBuffer.getDocument();
		IResource resource= info.fCopy.getResource();
		
		Assert.isTrue(resource instanceof IFile);
		if (!resource.exists()) {
			
			createFileFromDocument(monitor, (IFile) resource, document);
			return;
		}
		
		if (fSavePolicy != null)