public interface IPresentationReconciler
IPresentationReconcilerdefines and maintains the representation of a text viewer's document in the presence of changes applied to the document. An
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 repairer which construct text presentations. When applied to the presentation reconciler's text viewer, those text presentations 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 a pair of damager/repairer strategies. I.e. for each damager there should be a corresponding repairer.
The interface may be implemented by clients. Clients may use
PresentationReconciler as the standard implementation of this
In order to provided backward compatibility for clients of
IPresentationReconciler, extension interfaces are used to
provide a means of evolution. The following extension interface exists:
IPresentationReconcilerExtensionsince version 3.0 adding support for documents with multiple partitionings.
|Modifier and Type||Method and Description|
Returns the presentation damager registered with this presentation reconciler for the specified content type.
Returns the presentation repairer registered with this presentation reconciler for the specified content type.
Installs this presentation reconciler on the given text viewer.
Removes the reconciler from the text viewer it has previously been installed on.
void install(ITextViewer viewer)
uninstall methods must be
called in sequence; i.e. repeatedly calling
uninstall may throw an exception.
viewer- the viewer on which this presentation reconciler is installed
IPresentationDamager getDamager(String contentType)
contentType- the content type for which to determine the damager
nullif there is no damager
IPresentationRepairer getRepairer(String contentType)
contentType- the content type for which to determine the repairer
nullif there is no repairer
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.