|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.presentation.PresentationReconciler
Standard implementation of IPresentationReconciler
. This
implementation assumes that the tasks performed by its presentation damagers
and repairers are lightweight and of low cost. This presentation reconciler
runs in the UI thread and always repairs the complete damage caused by a
document change rather than just the portion overlapping with the viewer's
viewport.
Usually, clients instantiate this class and configure it before using it.
Field Summary | |
protected static String |
TRACKED_PARTITION
Prefix of the name of the position category for tracking damage regions. |
Constructor Summary | |
PresentationReconciler()
Creates a new presentation reconciler. |
Method Summary | |
protected TextPresentation |
createPresentation(IRegion damage,
IDocument document)
Constructs a "repair description" for the given damage and returns this description as a text presentation. |
IPresentationDamager |
getDamager(String contentType)
Returns the presentation damager registered with this presentation reconciler for the specified content type. |
String |
getDocumentPartitioning()
Returns the document partitioning this presentation reconciler is using. |
IPresentationRepairer |
getRepairer(String contentType)
Returns the presentation repairer registered with this presentation reconciler for the specified content type. |
void |
install(ITextViewer viewer)
Installs this presentation reconciler on the given text viewer. |
void |
setDamager(IPresentationDamager damager,
String contentType)
Registers the given presentation damager for a particular content type. |
void |
setDocumentPartitioning(String partitioning)
Sets the document partitioning for this presentation reconciler. |
protected void |
setDocumentToDamagers(IDocument document)
Informs all registered damagers about the document on which they will work. |
protected void |
setDocumentToRepairers(IDocument document)
Informs all registered repairers about the document on which they will work. |
void |
setRepairer(IPresentationRepairer repairer,
String contentType)
Registers the given presentation repairer for a particular content type. |
void |
uninstall()
Removes the reconciler from the text viewer it has previously been installed on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String TRACKED_PARTITION
Constructor Detail |
public PresentationReconciler()
IDocumentExtension3.DEFAULT_PARTITIONING
is used.
Method Detail |
public void setDocumentPartitioning(String partitioning)
partitioning
- the document partitioning for this presentation reconciler.public String getDocumentPartitioning()
IPresentationReconcilerExtension
getDocumentPartitioning
in interface IPresentationReconcilerExtension
public void setDamager(IPresentationDamager damager, String contentType)
damager
- the presentation damager to register, or null
to remove an existing onecontentType
- the content type under which to registerpublic void setRepairer(IPresentationRepairer repairer, String contentType)
repairer
- the presentation repairer to register, or null
to remove an existing onecontentType
- the content type under which to registerpublic void install(ITextViewer viewer)
IPresentationReconciler
uninstall
is called.
The install
and uninstall
methods must be
called in sequence; i.e. repeatedly calling install
without uninstalling may throw an exception.
install
in interface IPresentationReconciler
viewer
- the viewer on which this presentation reconciler is
installedpublic void uninstall()
IPresentationReconciler
uninstall
in interface IPresentationReconciler
public IPresentationDamager getDamager(String contentType)
IPresentationReconciler
getDamager
in interface IPresentationReconciler
contentType
- the content type for which to determine the damager
null
if there is no damagerpublic IPresentationRepairer getRepairer(String contentType)
IPresentationReconciler
getRepairer
in interface IPresentationReconciler
contentType
- the content type for which to determine the repairer
null
if there is no repairerprotected void setDocumentToDamagers(IDocument document)
document
- the document on which to workprotected void setDocumentToRepairers(IDocument document)
document
- the document on which to workprotected TextPresentation createPresentation(IRegion damage, IDocument document)
damage
- the damage to be repaireddocument
- the document whose presentation must be repaired
null
if the partitioning could not be computed
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.