public interface ITextViewerExtension
ITextViewer
.
This extension interface replaces the event consumer mechanism (
ITextViewer.setEventConsumer(IEventConsumer)
)
with a set of methods that allow to manage a sequence of
VerifyKeyListener
objects. It also adds
setRedraw(boolean)
IRewriteTarget
) represents
an facade offering the necessary methods to manipulate a document that is the
input document of a text viewer.Modifier and Type | Method and Description |
---|---|
void |
appendVerifyKeyListener(VerifyKeyListener listener)
Appends a verify key listener to the viewer's list of verify key
listeners.
|
Control |
getControl()
Returns the control of this viewer.
|
int |
getMark()
Returns the position of the mark,
-1 if the mark is not set. |
IRewriteTarget |
getRewriteTarget()
Returns the viewer's rewrite target.
|
void |
prependVerifyKeyListener(VerifyKeyListener listener)
Inserts the verify key listener at the beginning of the viewer's list of
verify key listeners.
|
void |
removeVerifyKeyListener(VerifyKeyListener listener)
Removes the verify key listener from the viewer's list of verify key listeners.
|
void |
setMark(int offset)
Sets a mark at the given offset or clears the mark if the specified
offset is
-1 . |
void |
setRedraw(boolean redraw)
Enables/disables the redrawing of this text viewer.
|
void prependVerifyKeyListener(VerifyKeyListener listener)
listener
- the listener to be insertedvoid appendVerifyKeyListener(VerifyKeyListener listener)
listener
- the listener to be addedvoid removeVerifyKeyListener(VerifyKeyListener listener)
listener
- the listener to be removedControl getControl()
void setMark(int offset)
-1
. If a mark is set and the selection is
empty, cut and copy actions performed on this text viewer work on the
region described by the positions of the mark and the cursor.offset
- the offset of the markint getMark()
-1
if the mark is not set.-1
if no mark is setvoid setRedraw(boolean redraw)
StyledText
widget. While being
disconnected only the viewer's selection may be changed using
setSelectedRange
. Any direct manipulation of the widget
as well as calls to methods that change the viewer's presentation state
(such as enabling the segmented view) are not allowed. When redrawing is
disabled the viewer does not send out any selection or view port change
notification. When redrawing is enabled again, a selection change
notification is sent out for the selected range and this range is
revealed causing a view port changed notification.redraw
- true
to enable redrawing, false
otherwiseIRewriteTarget getRewriteTarget()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.