Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Interface IDocumentExtension

All Known Implementing Classes:
AbstractDocument, ChildDocument, Document, ProjectionDocument

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)
          Deprecated. since 3.1. Use IDocumentExtension4.startRewriteSession(DocumentRewriteSessionType) instead.
 void stopPostNotificationProcessing ()
          Stops the processing of registered post notification replace operations until resumePostNotificationProcessing is called.
 void stopSequentialRewrite ()
          Deprecated. since 3.1. Use IDocumentExtension4.stopRewriteSession(DocumentRewriteSession) instead.
 

Method Detail

registerPostNotificationReplace

void registerPostNotificationReplace(
IDocumentListener owner,
                                     
IDocumentExtension.IReplace replace)
                                     throws 
UnsupportedOperationException
Callback for document listeners to be used inside documentChanged to register a post notification replace operation on the document notifying them.

Parameters:
owner - the owner of the replace operation
replace - the replace operation to be executed
Throws:
UnsupportedOperationException - if registerPostNotificationReplace is not supported by this document

stopPostNotificationProcessing

void stopPostNotificationProcessing()
Stops the processing of registered post notification replace operations until resumePostNotificationProcessing is called.


resumePostNotificationProcessing

void resumePostNotificationProcessing()
Resumes the processing of post notification replace operations. If the queue of registered IDocumentExtension.IReplace objects 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

void startSequentialRewrite(boolean normalize)
Deprecated. since 3.1. Use IDocumentExtension4.startRewriteSession(DocumentRewriteSessionType) instead.

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 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.

Parameters:
normalize - true if performed from the start to the end of the document

stopSequentialRewrite

void stopSequentialRewrite()
Deprecated. since 3.1. Use IDocumentExtension4.stopRewriteSession(DocumentRewriteSession) instead.

Tells the document that the sequential rewrite has been finished. This method has only any effect if startSequentialRewrite has been called before.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire