Constructor and Description |
---|
DocumentSnapshot(org.eclipse.jface.text.IDocument document)
Constructs a new snapshot of the given document.
|
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 DocumentSnapshot(org.eclipse.jface.text.IDocument document)
document
- must not be null
and
must implement IDocumentExtension4
.public java.lang.String getContents()
ISnapshot
null
.
Protractedly holding on 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
without actually obtaining their 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 two snapshots are predicted to be equal,
false
if the two snapshots are predicted to be unequal,
and null
if there is no predictionCopyright (c) 2014, 2018 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0