|
|||||||||
| Home >> All >> org >> eclipse >> jface >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.jface.text
Interface IDocumentExtension

- All Known Implementing Classes:
- AbstractDocument
- public interface IDocumentExtension
Extension interface for IDocument.
It introduces the notion of sequentially rewriting a document. This is to tell a document that a sequence of non-overlapping replace operation is about to be performed. Implementers can use this knowledge for internal optimization.
Is also introduces the concept of post notification replaces. This is, a document listener who is informed about a document change can cause a derived document change. As the listener is not allowed to directly modify the document, it can register a replace operation that is performed directly after all document listeners have been notified.
- Since:
- 2.0
| Nested Class Summary | |
static interface |
IDocumentExtension.IReplace
Interface for a post notification replace operation. |
| Method Summary | |
void |
registerPostNotificationReplace(IDocumentListener owner,
IDocumentExtension.IReplace replace)
Callback for document listeners to be used inside documentChanged
to register a post notification replace operation on the document notifying them. |
void |
resumePostNotificationProcessing()
Resumes the processing of post notification replace operations. |
void |
startSequentialRewrite(boolean normalize)
Tells the document that it is about to be sequentially rewritten. |
void |
stopPostNotificationProcessing()
Stops the processing of registered post notification replace operations until resumePostNotificationProcessing is called. |
void |
stopSequentialRewrite()
Tells the document that the sequential rewrite has been finished. |
| Method Detail |
registerPostNotificationReplace
public void registerPostNotificationReplace(IDocumentListener owner, IDocumentExtension.IReplace replace) throws java.lang.UnsupportedOperationException
- Callback for document listeners to be used inside
documentChangedto register a post notification replace operation on the document notifying them.
stopPostNotificationProcessing
public void stopPostNotificationProcessing()
- Stops the processing of registered post notification replace operations until
resumePostNotificationProcessingis called.
resumePostNotificationProcessing
public void resumePostNotificationProcessing()
- Resumes the processing of post notification replace operations. If the queue of registered
IDocumentExtension.IReplaceobjects is not empty, they are immediately processed if the document is not inside a replace operation. If the document is inside a replace operation, they are processed directly after the replace operation has finished.
startSequentialRewrite
public void startSequentialRewrite(boolean normalize)
- Tells the document that it is about to be sequentially rewritten. That is a
sequence of non-overlapping replace operations will be performed on it. The
normalizeflag 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
stopSequentialRewritehas not been called.
stopSequentialRewrite
public void stopSequentialRewrite()
- Tells the document that the sequential rewrite has been finished. This method
has only any effect if
startSequentialRewritehas been called before.
|
|||||||||
| Home >> All >> org >> eclipse >> jface >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC