Constructor and Description |
---|
TextFileBufferSnapshot(org.eclipse.core.filebuffers.ITextFileBuffer buffer,
org.eclipse.core.filebuffers.ITextFileBufferManager bufferManager)
Constructs a new snapshot of the given text file buffer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContents()
A snapshot returns the same contents until it expires.
|
protected java.lang.Boolean |
predictEquality(Snapshot other)
|
public TextFileBufferSnapshot(org.eclipse.core.filebuffers.ITextFileBuffer buffer, org.eclipse.core.filebuffers.ITextFileBufferManager bufferManager)
buffer
- a buffer connected through the given buffer manager -
must not be null
and must be connected at least
during the execution of this constructorbufferManager
- must not be null
public java.lang.String getContents()
ISnapshot
null
.
Protractedly holding on to the returned contents is not recommended, as it may potentially consume significant amount of space.
null
if
the snapshot has expiredprotected java.lang.Boolean predictEquality(Snapshot other)
Snapshot
equal
to
the given snapshot without actually obtaining snapshot contents
. Must return null
if cannot tell for sure. Any non-null
result must meet the contract of ISnapshot.isEqualTo(ISnapshot)
.predictEquality
in class Snapshot
other
- the other snapshot (not null
and not identical to the receiver)true
if the snapshots are predicted to be equal,
false
if the snapshots are predicted to be unequal,
and null
if there is no predictionCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0