public class Document extends AbstractDocument
GapTextStore
wrapped inside a
CopyOnWriteTextStore
as default text store and a
SequentialRewriteTextStore
when in sequential
rewrite mode.
The used line tracker considers the following strings as line delimiters "\n", "\r", "\r\n".
The document is ready to use. It has a default position category for which a default position updater is installed.
IDocumentExtension.IReplace
DEFAULT_CATEGORY, DEFAULT_CONTENT_TYPE
DEFAULT_PARTITIONING
UNKNOWN_MODIFICATION_STAMP
Constructor and Description |
---|
Document()
Creates a new empty document.
|
Document(String initialContent)
Creates a new document with the given initial content.
|
Modifier and Type | Method and Description |
---|---|
void |
startSequentialRewrite(boolean normalized)
Tells the document that it is about to be sequentially rewritten.
|
void |
stopSequentialRewrite()
Tells the document that the sequential rewrite has been finished.
|
acceptPostNotificationReplaces, addDocumentListener, addDocumentPartitioningListener, addDocumentRewriteSessionListener, addPosition, addPosition, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, checkStateOfPartitioner, completeInitialization, computeIndexInCategory, computeIndexInPositionList, computeNumberOfLines, computePartitioning, computePartitioning, containsPosition, containsPositionCategory, doFireDocumentChanged, doFireDocumentChanged, doFireDocumentChanged2, fireDocumentAboutToBeChanged, fireDocumentChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireRewriteSessionChanged, get, get, getActiveRewriteSession, getChar, getContentType, getContentType, getDefaultLineDelimiter, getDocumentListeners, getDocumentManagedPositions, getDocumentPartitioner, getDocumentPartitioner, getDocumentPartitioningListeners, getLegalContentTypes, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getModificationStamp, getNumberOfLines, getNumberOfLines, getPartition, getPartition, getPartitionings, getPositionCategories, getPositions, getPositionUpdaters, getStore, getTracker, ignorePostNotificationReplaces, insertPositionUpdater, registerPostNotificationReplace, removeDocumentListener, removeDocumentPartitioningListener, removeDocumentRewriteSessionListener, removePosition, removePosition, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, repairLineInformation, replace, replace, resumeListenerNotification, resumePostNotificationProcessing, search, set, set, setDocumentPartitioner, setDocumentPartitioner, setInitialLineDelimiter, setLineTracker, setTextStore, startRewriteSession, startRewriteSessionOnPartitioners, stopListenerNotification, stopPostNotificationProcessing, stopRewriteSession, stopRewriteSessionOnPartitioners, updateDocumentStructures, updatePositions
public Document()
public Document(String initialContent)
initialContent
- the document's initial contentpublic void startSequentialRewrite(boolean normalized)
IDocumentExtension
normalize
flag indicates whether the rewrite is performed from
the start of the document to its end or from an arbitrary start offset.
The document is considered being in sequential rewrite mode as long as
stopSequentialRewrite
has not been called.
startSequentialRewrite
in interface IDocumentExtension
startSequentialRewrite
in class AbstractDocument
normalized
- true
if performed from the start to the end of the documentpublic void stopSequentialRewrite()
IDocumentExtension
startSequentialRewrite
has been called before.stopSequentialRewrite
in interface IDocumentExtension
stopSequentialRewrite
in class AbstractDocument
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.