|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.ChildDocumentManager
ChildDocumentManager
is one particular implementation of
ISlaveDocumentManager
. This manager creates so called child
documents as slave documents for given master documents.
A child document represents a particular range of the parent
document and is accordingly adapted to changes of the parent document.
Vice versa, the parent document is accordingly adapted to changes of
its child documents. The manager does not maintain any particular management
structure but utilizes mechanisms given by IDocument
such
as position categories and position updaters.
For internal use only.
Field Summary | |
static String |
CHILDDOCUMENTS
Name of the position category used to keep track of the ranges of the parent documents that correspond to child documents. |
Constructor Summary | |
ChildDocumentManager()
|
Method Summary | |
IDocumentInformationMapping |
createMasterSlaveMapping(IDocument slave)
Creates a new document information mapping between the given slave document and its master document. |
IDocument |
createSlaveDocument(IDocument master)
Creates a new slave document for the given master document. |
void |
documentAboutToBeChanged(DocumentEvent event)
The manipulation described by the document event will be performed. |
void |
documentChanged(DocumentEvent event)
The manipulation described by the document event has been performed. |
protected void |
fireDocumentEvent(boolean about,
DocumentEvent event)
Informs all child documents of the document which issued this document event. |
void |
freeSlaveDocument(IDocument slave)
Frees the given slave document. |
protected IPositionUpdater |
getChildPositionUpdater()
Returns the child position updater. |
IDocument |
getMasterDocument(IDocument slave)
Returns the master document of the given slave document or null if the
given document is unknown to this slave document manager. |
boolean |
isSlaveDocument(IDocument document)
Returns whether the given document is a slave document known to this slave document manager. |
void |
setAutoExpandMode(IDocument slaveDocument,
boolean autoExpand)
Sets the given slave document's auto expand mode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CHILDDOCUMENTS
Constructor Detail |
public ChildDocumentManager()
Method Detail |
protected IPositionUpdater getChildPositionUpdater()
public IDocument createSlaveDocument(IDocument master)
ISlaveDocumentManager
freeSlaveDocument
is called. The connection between the newly created slave document and the master
document is managed by this slave document manager.createSlaveDocument
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
master
- the master documentISlaveDocumentManager.freeSlaveDocument(IDocument)
public void freeSlaveDocument(IDocument slave)
ISlaveDocumentManager
createSlaveDocument
.freeSlaveDocument
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
slave
- the slave document to be freedpublic IDocumentInformationMapping createMasterSlaveMapping(IDocument slave)
ISlaveDocumentManager
null
if the given document is unknown
to this slave document manager.createMasterSlaveMapping
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
slave
- the slave documentnull
public IDocument getMasterDocument(IDocument slave)
ISlaveDocumentManager
null
if the
given document is unknown to this slave document manager.getMasterDocument
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
slave
- the slave documentnull
public boolean isSlaveDocument(IDocument document)
ISlaveDocumentManager
isSlaveDocument
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
document
- the document to be checked whether it is a slave document known to this managertrue
if the document is a slave document, false
otherwiseprotected void fireDocumentEvent(boolean about, DocumentEvent event)
about
- indicates whether the change is about to happen or alread happendevent
- the document event which will be processed to inform child documentspublic void documentChanged(DocumentEvent event)
IDocumentListener
documentChanged
in interface IDocumentListener
org.eclipse.jface.text.IDocumentListener
event
- the document event describing the document changepublic void documentAboutToBeChanged(DocumentEvent event)
IDocumentListener
documentAboutToBeChanged
in interface IDocumentListener
org.eclipse.jface.text.IDocumentListener
event
- the document event describing the document changepublic void setAutoExpandMode(IDocument slaveDocument, boolean autoExpand)
ISlaveDocumentManager
This call is without effect if the given document is unknown to this slave document manager.
setAutoExpandMode
in interface ISlaveDocumentManager
org.eclipse.jface.text.ISlaveDocumentManager
slave
- the slave whose auto expand mode should be setautoExpand
- true
for auto expand, false
otherwise
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |