Method Summary |
|
void | activatePlugins() Activates the installed plug-ins. |
void | addTextInputListener(ITextInputListener listener) Adds a text input listener to this viewer. |
void | addTextListener(ITextListener listener) Adds a text listener to this viewer. |
void | addViewportListener(IViewportListener listener) Adds the given view port listener to this viewer. |
void | changeTextPresentation(TextPresentation presentation, boolean controlRedraw) Applies the color information encoded in the given text presentation.
controlRedraw tells this viewer whether it should take care of
redraw management or not. |
int | getBottomIndex() Returns the visible line with the highest line number. |
int | getBottomIndexEndOffset() Returns the document offset of the lower right
corner of this viewer's view port. |
IDocument | getDocument() Returns the text viewer's input document. |
IFindReplaceTarget | getFindReplaceTarget() Returns the find/replace operation target of this viewer. |
Point | getSelectedRange() Returns the range of the current selection in coordinates of this viewer's document. |
ISelectionProvider | getSelectionProvider() Returns a selection provider dedicated to this viewer. |
ITextOperationTarget | getTextOperationTarget() Returns the text operation target of this viewer. |
StyledText | getTextWidget() Returns this viewer's SWT control, null if the control is disposed.
Calling API directly on the widget can interfere with features provided
by a text viewer. |
int | getTopIndex() Returns the visible line with the smallest line number. |
int | getTopIndexStartOffset() Returns the document offset of the upper left corner of this viewer's view port. |
int | getTopInset() Returns the vertical offset of the first visible line. |
IRegion | getVisibleRegion() Returns the current visible region of this viewer's document. |
void | invalidateTextPresentation() Marks the currently applied text presentation as invalid. |
boolean | isEditable() Returns whether the shown text can be manipulated. |
boolean | overlapsWithVisibleRegion(int offset, int length) Returns whether a given range overlaps with the visible region of this
viewer's document.
Viewers implementing
ITextViewerExtension5 may be forced to
change the fractions of the input document that are shown in order to
fulfill this request. |
void | removeTextInputListener(ITextInputListener listener) Removes the given listener from this viewer's set of text input listeners. |
void | removeTextListener(ITextListener listener) Removes the given listener from this viewer's set of text listeners. |
void | removeViewportListener(IViewportListener listener) Removes the given listener from this viewer's set of view port listeners. |
void | resetPlugins() Resets the installed plug-ins. |
void | resetVisibleRegion() Resets the region of this viewer's document which is visible in the presentation. |
void | revealRange(int offset, int length) Ensures that the given range is visible. |
void | setAutoIndentStrategy(IAutoIndentStrategy strategy, String contentType) Sets this viewer's auto indent strategy for the given content type. |
void | setDefaultPrefixes(String[] defaultPrefixes, String contentType) Sets the strings that are used as prefixes when lines of the given content type
are prefixed using the prefix text operation. |
void | setDocument(IDocument document) Sets the given document as the text viewer's model and updates the
presentation accordingly. |
void | setDocument(IDocument document, int modelRangeOffset, int modelRangeLength) Sets the given document as this viewer's model and
exposes the specified region. |
void | setEditable(boolean editable) Sets the editable state. |
void | setEventConsumer(IEventConsumer consumer) Registers an event consumer with this viewer. |
void | setIndentPrefixes(String[] indentPrefixes, String contentType) Sets the strings that are used as prefixes when lines of the given content type
are shifted using the shift text operation. |
void | setSelectedRange(int offset, int length) Sets the selection to the specified range. |
void | setTextColor(Color color) Applies the given color as text foreground color to this viewer's
selection. |
void | setTextColor(Color color, int offset, int length, boolean controlRedraw) Applies the given color as text foreground color to the specified section
of this viewer. |
void | setTextDoubleClickStrategy(ITextDoubleClickStrategy strategy, String contentType) Sets this viewer's text double click strategy for the given content type.
Parameters: strategy - the new double click strategy. |
void | setTextHover(ITextHover textViewerHover, String contentType) Sets this viewer's text hover for the given content type.
This method has been replaced by
ITextViewerExtension2.setTextHover(ITextHoverStringint) .
It is now equivalent to
ITextViewerExtension2 extension= (ITextViewerExtension2) document;
extension.setTextHover(textViewerHover, contentType, ITextViewerExtension2#DEFAULT_HOVER_STATE_MASK);
Parameters: textViewerHover - the new hover. |
void | setTopIndex(int index) Scrolls the widget so that the given index is the line
with the smallest line number of all visible lines. |
void | setUndoManager(IUndoManager undoManager) Sets this viewer's undo manager.
Parameters: undoManager - the new undo manager. |
void | setVisibleRegion(int offset, int length) Defines and sets the region of this viewer's document which will be
visible in the presentation. |