|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An IPresentationReconciler
defines and maintains the representation of a
text viewer's document in the presence of changes applied to the document.
An IPresentationReconciler
is a ITextViewer
add-on.
The presentation reconciler keeps track of changes applied to the text viewer. It sends each change to presentation damagers which are registered for the content types of the regions in which the change occurred. The presentation reconciler passes the computed damage to presentation repairers which construct text presentations. Those text presentation when applied to the presentation reconciler's text viewer bring the document's presentation in sync with the document's content and thus repair the damage. A presentation damager is expected to return damage which is a valid input for a presentation repairer registered for the same content type as the damager.
A presentation reconciler should always be configured with damager/repairer pairs. I.e. for each damager there should be a corresponding repairer.
The interface can be implemented by clients. By default, clients use
PresentationReconciler
as the standard implementer of this interface.
ITextViewer
,
IPresentationDamager
,
IPresentationRepairer
,
TextPresentation
Method Summary | |
IPresentationDamager |
getDamager(String contentType)
Returns the presentation damager registered with this presentation reconciler for the specified content type. |
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 |
uninstall()
Removes the reconciler from the text viewer it has previously been installed on. |
Method Detail |
public void install(ITextViewer viewer)
uninstall
is called.
public void uninstall()
public IPresentationDamager getDamager(String contentType)
contentType
- the content type for which to determine the damager
null
if there is no such strategypublic IPresentationRepairer getRepairer(String contentType)
contentType
- the content type for which to determine the repairer
null
if there is no such strategy
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |