protected class AbstractTextEditor.LineStartAction 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 |
---|
LineStartAction(StyledText textWidget,
boolean doSelect)
Creates a new line start action.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getLineStartPosition(IDocument document,
String line,
int length,
int offset)
Computes the offset of the line start 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 LineStartAction(StyledText textWidget, boolean doSelect)
textWidget
- the styled text widgetdoSelect
- a boolean flag which tells if the text up to the beginning of the line should be selectedprotected int getLineStartPosition(IDocument document, String line, int length, int offset)
document
- the document where to compute the line start positionline
- the line to determine the start 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, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.