|
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.ProjectionDocumentManager
ProjectionDocumentManager
is one particular implementation of
ISlaveDocumentManager
. This manager creates so called projection
documents as slave documents for given master documents.
A projection document represents a particular projection 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.
This class if for internal use only.
Field Summary | |
static String |
PROJECTION_DOCUMENTS
Name of the position category used to keep track of the parent document ranges that correspond to the fragments of the projection documents. |
Constructor Summary | |
ProjectionDocumentManager()
|
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 projection documents of the master document that issued the given document event. |
void |
freeSlaveDocument(IDocument slave)
Frees the given slave document. |
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. |
protected IPositionUpdater |
getProjectionPositionUpdater()
Returns the projection position updater. |
boolean |
isSlaveDocument(IDocument document)
Returns whether the given document is a slave document known to this slave document manager. |
void |
setAutoExpandMode(IDocument slave,
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 PROJECTION_DOCUMENTS
Constructor Detail |
public ProjectionDocumentManager()
Method Detail |
protected IPositionUpdater getProjectionPositionUpdater()
protected 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 the projection 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 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 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 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
otherwisepublic void setAutoExpandMode(IDocument slave, 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 |