Eclipse Platform
2.0

org.eclipse.jface.text.presentation
Class PresentationReconciler

java.lang.Object
  |
  +--org.eclipse.jface.text.presentation.PresentationReconciler
All Implemented Interfaces:
IPresentationReconciler

public class PresentationReconciler
extends Object
implements IPresentationReconciler

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
 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 setDamager(IPresentationDamager damager, String contentType)
          Registers a given presentation damager for a particular content type.
 void setRepairer(IPresentationRepairer repairer, String contentType)
          Registers a 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

TRACKED_PARTITION

protected static final String TRACKED_PARTITION
Prefix of the name of the position category for tracking damage regions.

See Also:
Constant Field Values
Constructor Detail

PresentationReconciler

public PresentationReconciler()
Creates a new presentation reconciler. There are no damagers or repairers registered with this reconciler.

Method Detail

setDamager

public void setDamager(IPresentationDamager damager,
                       String contentType)
Registers a given presentation damager for a particular content type. If there is already a damager registered for this type, the new damager is registered instead of the old one.

Parameters:
damager - the presentation damager to register, or null to remove an existing one
contentType - the content type under which to register

setRepairer

public void setRepairer(IPresentationRepairer repairer,
                        String contentType)
Registers a given presentation repairer for a particular content type. If there is already a repairer registered for this type, the new repairer is registered instead of the old one.

Parameters:
repairer - the presentation repairer to register, or null to remove an existing one
contentType - the content type under which to register

install

public void install(ITextViewer viewer)
Description copied from interface: IPresentationReconciler
Installs this presentation reconciler on the given text viewer. After this method has been finished, the reconciler is operational. I.e., it works without requesting further client actions until uninstall is called.

Specified by:
install in interface IPresentationReconciler

uninstall

public void uninstall()
Description copied from interface: IPresentationReconciler
Removes the reconciler from the text viewer it has previously been installed on.

Specified by:
uninstall in interface IPresentationReconciler

getDamager

public IPresentationDamager getDamager(String contentType)
Description copied from interface: IPresentationReconciler
Returns the presentation damager registered with this presentation reconciler for the specified content type.

Specified by:
getDamager in interface IPresentationReconciler
Parameters:
contentType - the content type for which to determine the damager
Returns:
the presentation damager registered for the given content type, or null if there is no such strategy

getRepairer

public IPresentationRepairer getRepairer(String contentType)
Description copied from interface: IPresentationReconciler
Returns the presentation repairer registered with this presentation reconciler for the specified content type.

Specified by:
getRepairer in interface IPresentationReconciler
Parameters:
contentType - the content type for which to determine the repairer
Returns:
the presentation repairer registered for the given content type, or null if there is no such strategy

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.