ISVNLocalFile localFile = getManagedSVNFile();  if (!localFile.getStatus().isAdded() && documentProvider instanceof IStorageDocumentProvider) { IStorageDocumentProvider provider= (IStorageDocumentProvider) documentProvider; String encoding= provider.getEncoding(editor.getEditorInput()); if (encoding == null) { encoding= provider.getDefaultEncoding(); } if(monitor.isCanceled()) return;  InputStream stream= getPristineContent(localFile.getIResource()); if (stream == null || monitor.isCanceled() || ! isReferenceInitialized) { return; } setDocumentContent(referenceDocument, stream, encoding); } else { if(monitor.isCanceled()) return; referenceDocument.set(""); } if(DEBUG) System.out.println("+ SVNQuickDiff: updating document " + (referenceDocument!=null ? "remote found" : "remote empty")); }
if (!localFile.getStatus().isAdded() && documentProvider instanceof IStorageDocumentProvider) { IStorageDocumentProvider provider= (IStorageDocumentProvider) documentProvider; String encoding= provider.getEncoding(editor.getEditorInput()); if (encoding == null) { encoding= provider.getDefaultEncoding(); } if(monitor.isCanceled()) return;  ISVNRemoteResource remoteFile = localFile.getBaseResource(); if (remoteFile == null || monitor.isCanceled() || ! isReferenceInitialized) { return; } setDocumentContent(referenceDocument, remoteFile.getStorage(monitor).getContents(), encoding); } else { if(monitor.isCanceled()) return; referenceDocument.set(""); } if(DEBUG) System.out.println("+ SVNQuickDiff: updating document " + (referenceDocument!=null ? "remote found" : "remote empty")); }
  private void readDocument(IProgressMonitor monitor) throws CoreException {      if(! isReferenceInitialized) return;      if(referenceDocument == null)          referenceDocument = new Document();      ISVNLocalFile localFile = getManagedSVNFile();      if (!localFile.getStatus().isAdded() && documentProvider instanceof IStorageDocumentProvider) {          IStorageDocumentProvider provider= (IStorageDocumentProvider) documentProvider;                      String encoding= provider.getEncoding(editor.getEditorInput());          if (encoding == null) {              encoding= provider.getDefaultEncoding();          }          if(monitor.isCanceled()) return;          InputStream stream= getPristineContent(localFile.getIResource());          if (stream == null || monitor.isCanceled() || ! isReferenceInitialized) {              return;          }          setDocumentContent(referenceDocument, stream, encoding);      } else {          if(monitor.isCanceled()) return;          referenceDocument.set(""); //$NON-NLS-1$      }      if(DEBUG) System.out.println("+ SVNQuickDiff: updating document " + (referenceDocument!=null ? "remote found" : "remote empty")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$  }