/** * Has the document been modified since it has been first acquired by the change? * * @return Returns true if the document has been modified since it got acquired by the change. * <code>false</code> is returned if the document has not been acquired yet, or has been released * already. * * @since 3.3 */ protected boolean isDocumentModified() { if (fAcquireCount > 0) { ContentStamp currentStamp= ContentStamps.get(fFile, fBuffer.getDocument()); return !currentStamp.equals(fContentStamp); } return false; }
/** * Has the document been modified since it has been first acquired by the change? * * @return Returns true if the document has been modified since it got acquired by the change. * <code>false</code> is returned if the document has not been acquired yet, or has been released * already. * * @since 3.3 */ protected boolean isDocumentModified() { if (fAcquireCount > 0) { ContentStamp currentStamp= ContentStamps.get(fFile, fBuffer.getDocument()); return !currentStamp.equals(fContentStamp); } return false; }
/** * Has the document been modified since it has been first acquired by the change? * * @return Returns true if the document has been modified since it got acquired by the change. * <code>false</code> is returned if the document has not been acquired yet, or has been released * already. * * @since 3.3 */ protected boolean isDocumentModified() { if (fAcquireCount > 0) { ContentStamp currentStamp= ContentStamps.get(fFile, fBuffer.getDocument()); return !currentStamp.equals(fContentStamp); } return false; }
@Override protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException { fAcquireCount++; if (fAcquireCount > 1) return fBuffer.getDocument(); ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, pm); fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); IDocument result= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, result); return result; }
@Override protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException { fAcquireCount++; if (fAcquireCount > 1) return fBuffer.getDocument(); ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, pm); fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); IDocument result= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, result); return result; }
/** * {@inheritDoc} */ protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException { fAcquireCount++; if (fAcquireCount > 1) return fBuffer.getDocument(); ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, pm); fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); IDocument result= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, result); return result; }
/** * Acquires a document from the file buffer manager. * * @param monitor * the progress monitor to use * @return the document * @throws CoreException if the document could not successfully be acquired */ private IDocument acquireDocument(final IProgressMonitor monitor) throws CoreException { if (fCount > 0) return fBuffer.getDocument(); final ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); final IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, monitor); fCount++; fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); final IDocument document= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, document); return document; }
/** * Acquires a document from the file buffer manager. * * @param monitor * the progress monitor to use * @return the document * @throws CoreException if the document could not successfully be acquired */ private IDocument acquireDocument(final IProgressMonitor monitor) throws CoreException { if (fCount > 0) return fBuffer.getDocument(); final ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); final IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, monitor); fCount++; fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); final IDocument document= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, document); return document; }
/** * Acquires a document from the file buffer manager. * * @param monitor * the progress monitor to use * @return the document * @throws CoreException */ private IDocument acquireDocument(final IProgressMonitor monitor) throws CoreException { if (fCount > 0) return fBuffer.getDocument(); final ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager(); final IPath path= fFile.getFullPath(); manager.connect(path, LocationKind.IFILE, monitor); fCount++; fBuffer= manager.getTextFileBuffer(path, LocationKind.IFILE); final IDocument document= fBuffer.getDocument(); fContentStamp= ContentStamps.get(fFile, document); return document; }
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);
buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE); IDocument document= buffer.getDocument(); ContentStamp currentStamp= ContentStamps.get(fFile, document);