protected class AbstractTextEditor.LineEndAction extends TextNavigationAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
Constructor and Description |
---|
LineEndAction(StyledText textWidget,
boolean doSelect)
Create a new line end action.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getLineEndPosition(IDocument document,
String line,
int length,
int offset)
Computes the offset of the line end position.
|
void |
run()
The default implementation of this
IAction method does
nothing. |
addPropertyChangeListener, fireSelectionChanged, fireSelectionChanged, getAccelerator, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getImageDescriptor, getMenuCreator, getStyle, getText, getTextWidget, getToolTipText, isChecked, isEnabled, removePropertyChangeListener, runWithEvent, setAccelerator, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setImageDescriptor, setMenuCreator, setText, setToolTipText
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getActionDefinitionId, getId, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setActionDefinitionId, setId
firePropertyChange, firePropertyChange
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public LineEndAction(StyledText textWidget, boolean doSelect)
textWidget
- the styled text widgetdoSelect
- a boolean flag which tells if the text up to the line end should be selectedprotected int getLineEndPosition(IDocument document, String line, int length, int offset)
document
- the document where to compute the line end positionline
- the line to determine the end position oflength
- the length of the lineoffset
- the caret position in the documentpublic void run()
Action
IAction
method does
nothing. Subclasses should override this method if they do not need
information from the triggering event, or override
runWithEvent(Event)
if they do.run
in interface IAction
run
in class TextNavigationAction
How radio buttons are handled
,
How check boxes are handled
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.