Package org.eclipse.jface.text
Provides a framework for creating and manipulating text documents.
Package Specification
IDocument
is the major text
model abstraction. It provides content management, position management using
position categories, document partition management, and change notification.
In order to be notified about document changes, an object must implements IDocumentListener
and must be registered with the document. Position
updating in responds to a document change is performed by implementers of IDocumentPositionUpdater
.
Partition updating in responds to a document change is performed by implements
of IDocumentPartitioner
. In order
to be notified about document partition changes, objects must implement IDocumentParititoningListener
and must be registered with the document.
The package contains default implementations for document position updaters
and for documents. AbstractDocument
uses ITextStorage
for storing
and managing its content and ILineTracker
to maintain a line structure of its content. As defaults a gap text implementation
of ITextStore
is provided, together
with a line tracker understanding the three standard line delimiters ("\r",
"\n", "\r\n") and a line tracker which can be freely configured
to consider any given set of strings as valid line delimiters.
ITextViewer
defines the concept of a document based, editiable viewer.
ITextViewer
offers the following functionality:
- present a document
-
event consumption (
IEventConsumer
) -
viewport tracking and notification (
IIViewportListener
) -
change notification (
ITextListener
,ITextInputListener
) - listeners (combined view/model notification, input document)
- standard text editing functions plus text hover support
- visual region support
ITextViewer
supports the following plug-ins
-
IUndoManager
for the undo/redo mechanism -
IDoubleClickStrategy
for partition type specific behavior on mouse double click -
IAutoIndentStrategy
for content type specific behavior on inserting a line break -
ITextHover
for content type specific behavior when overing over text
-
ClassDescriptionAbstract default implementation of
IDocument
and its extension interfacesIDocumentExtension
,IDocumentExtension2
,IDocumentExtension3
,IDocumentExtension4
, as well asIRepairableDocument
.An information control manager that shows information in response to mouse hover events.An abstract information control that can show content inside a shell.Manages the life cycle, visibility, layout, and contents of anIInformationControl
.Constitutes entities to enumerate anchors for the layout of the information control.Interface of an information control closer.Abstract implementation ofILineTracker
.Combines the information of the occurrence of a line delimiter.Representation of replace and set requests.Abstract class for a reusable information control creators.Indicates the attempt to access a non-existing position.Represents the attempt to refer to a non-existing document partitioning.Indicates the attempt to access a non-existing position category in a document.Standard implementation ofIBlockTextSelection
.Standard implementation of a genericILineTracker
.Copy-on-writeITextStore
wrapper.A painter the draws the background of the caret line in a configured color.Deprecated.This strategy always copies the indentation of the previous line.Default implementation ofIInformationControl
.An information presenter determines the style presentation of information displayed in the default information control.An information presenter determines the style presentation of information displayed in the default information control.Standard implementation ofILineTracker
.Default implementation ofIPositionUpdater
.Standard implementation ofITextDoubleClickStrategy
.Standard implementation ofITextHover
.Deprecated.As of 3.2, replaced byTextViewerUndoManager
Default document implementation.Represents a text modification as a document replace command.Specification of changes applied to documents.Event describing the change of document partitionings.A document rewrite session.Description of the state of document rewrite sessions.A document rewrite session type.Provides search and replace operations onIDocument
.Content assist proposal provider for theFindReplaceDocumentAdapter
.Implements a gap managing text store.An auto edit strategy can adapt changes that will be applied to a text viewer's document.Deprecated.since 3.0, useIAutoEditStrategy
directlyA rectangular selection in a text document.A delayed input change provider notifies the registeredIInputChangedListener
about input changes that occur after the normal operation of the provider.AnIDocument
represents text providing support for text manipulation positions partitions line information document change listeners document partition change listeners A document allows to set its content and to manipulate it.Adapts anIDocument
to theStyledTextContent
interface.Extension interface forIDocumentAdapter
.Extension interface forIDocument
.Interface for a post notification replace operation.Extension interface forIDocument
.Extension interface forIDocument
.Extension interface forIDocument
.AIDocumentInformationMapping
represents a mapping between the coordinates of twoIDocument
objects: the original and the image.Extension toIDocumentInformationMapping
.Extension toIDocumentInformationMapping
.Interface for objects which are interested in getting informed about document changes.A document partitioner divides a document into a set of disjoint text partitions.Extension interface forIDocumentPartitioner
.Extension interface forIDocumentPartitioner
.Extension interface forIDocumentPartitioner
.Interface of objects which are interested in getting informed about changes of a document's partitioning.Extension interface forIDocumentPartitioningListener
.Extension interface toIDocumentPartitioningListener
.Interface for objects which are interested in getting informed about document rewrite sessions.Implemented by tools supporting the editing process.A registry forIEditingSupport
s.Implementers can register with a text viewer and receiveVerifyEvent
s before the text viewer they are registered with.Defines the target for finding and replacing strings.Extension interface forIFindReplaceTarget
.Extension interface forIFindReplaceTarget
.Extension interface forIFindReplaceTarget
providing methods to select multiple text ranges.Interface of a control presenting information.Interface of a factory for information controls (IInformationControl
).Extension interface forIInformationControlCreator
Extension interfaceIInformationControl
.Extension interface forIInformationControl
.Extension interface forIInformationControl
.Extension interface forIInformationControl
.Extension interface forIInformationControl
.A listener which is notified when the target's input changes.A line tracker maps character positions to line numbers and vice versa.Extension interface forILineTracker
.A mark region target to support marked regions as found in emacs.A mark selection can be sent out by text viewers.This interface represents a textual selection that can be made of multiple discontinued selected ranges.A painter is responsible for creating, managing, updating, and removing visual decorations on anITextViewer
's text widget.Manages and updates positions used byIPainter
s.A position updater is responsible for adapting document positions.A region describes a certain range in an indexed text store.Tagging interface to be implemented byIDocument
implementers that offer a line repair method on the documents.Extension interface forIRepairableDocument
.A target publishing the required functions to modify a document that is displayed in a text viewer.A selection validator allows clients to test whether the selection they received during selection changed notification is valid.Slave documents are documents whose contents is defined in terms of a master document.Extension interface forISlaveDocumentManager
.Interface for text related objects which may be used in the multi-threaded context and thus must provide a way to prevent concurrent access and manipulation.A text double click strategy defines the reaction of a text viewer to mouse double click events.Computes the information to be shown in a hover popup which appears on top of the text viewer's text widget when a hover event occurs.Extension interface forITextHover
.Extension interface forITextHover
.Text input listeners registered with anITextViewer
are informed if the document serving as the text viewer's model is replaced.Text listeners registered with a text viewer are informed about all modifications of anITextViewer
by means of text events.Defines the target for text operations.Extension interface forITextOperationTarget
.Text presentation listeners registered with anITextViewer
are informed when aTextPresentation
is about to be applied to the text viewer.This interface represents a textual selection.Interface for storing and managing text.A text viewer connects a text widget with anIDocument
.Extension interface forITextViewer
.Extension interface forITextViewer
.Deprecated.replaced byITextViewerExtension5
Extension interface forITextViewer
.Extension interface forITextViewer
.Extension interface forITextViewer
.Extension interface forITextViewer
.Extension interface forITextViewer
.Type-safe enum of the available enrich modes.Extension interface forITextViewer
.ITextViewer
lifecycle API to track install / uninstall of a givenITextViewer
for the given contribution which extendsITextViewerLifecycle
:IReconciler
IPresentationReconciler
IHyperlinkPresenter
DefaultInformationControl.IInformationPresenter
IContentAssistant
It is possible too to implementITextViewerLifecycle
to track install / uninstall of a givenITextViewer
for implementation of:IReconcilingStrategy
IAutoEditStrategy
Describes a region of an indexed text store such as a document or a string.An undo manager is connected to at most oneITextViewer
.Extension interface forIUndoManager
.Registered with a text viewer, view port listeners are informed about changes of a text viewer's view port.A widget token keeper may require a widget token from anIWidgetTokenOwner
and release the token to the owner after usage.Extension interface forIWidgetTokenKeeper
.In order to display information in a temporary window, a widget token must be acquired.Extension interface forIWidgetTokenOwner
.A collection of JFace Text functions.Paints a vertical line (margin line) after a given column respecting the text viewer's font.Default implementation ofIMarkSelection
.Fast matcher to find the occurrences of any of a fixed set of constant strings.A Builder for creating aMultiStringMatcher
.Describes a match result ofMultiStringMatcher.indexOf(CharSequence, int)
, giving access to the matched string and the offset in the text it was matched at.Manages theIPainter
object registered with anITextViewer
.Positions describe text ranges of a document.Deprecated.since 3.0 not longer in use, no longer supportedThe default implementation of theIRegion
interface.A text edit processor that brackets the application of edits into a document rewrite session.Deprecated.since 3.3 asGapTextStore
performs better even for sequential rewrite scenariosA slave document event represents a master document event as a slave-relative document event.Auto edit strategy that converts tabs into spaces.Description of textual attributes such as color and style.This event is sent to implementers ofITextListener
.Describes the presentation styles for a section of an indexed text such as a document or string.Standard implementation ofITextSelection
.A collection of text functions.SWT based implementation ofITextViewer
and its extension interfaces.Implementation ofIUndoManager
using the shared document undo manager.Convenience class for positions that have a type, similar toITypedRegion
.Default implementation ofITypedRegion
.A painter for drawing visible characters for (invisible) whitespace characters.
DefaultIndentLineAutoEditStrategy
instead