Package org.eclipse.jface.text
Class DefaultTextDoubleClickStrategy
java.lang.Object
org.eclipse.jface.text.DefaultTextDoubleClickStrategy
- All Implemented Interfaces:
ITextDoubleClickStrategy
Standard implementation of
ITextDoubleClickStrategy
.
Selects words using java.text.BreakIterator
for the default
locale.
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new default text double click strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doubleClicked
(ITextViewer text) The mouse has been double clicked on the given text viewer.protected IRegion
findExtendedDoubleClickSelection
(IDocument document, int offset) Tries to find a suitable double click selection for the given offset.protected IRegion
Tries to find the word at the given offset.
-
Constructor Details
-
DefaultTextDoubleClickStrategy
public DefaultTextDoubleClickStrategy()Creates a new default text double click strategy.
-
-
Method Details
-
doubleClicked
Description copied from interface:ITextDoubleClickStrategy
The mouse has been double clicked on the given text viewer.- Specified by:
doubleClicked
in interfaceITextDoubleClickStrategy
- Parameters:
text
- the viewer into which has been double clicked
-
findExtendedDoubleClickSelection
Tries to find a suitable double click selection for the given offset.Note: This method must return
null
if it simply selects the word at the given offset.- Parameters:
document
- the documentoffset
- the offset- Returns:
- the selection or
null
if none to indicate simple word selection - Since:
- 3.5
-
findWord
Tries to find the word at the given offset.- Parameters:
document
- the documentoffset
- the offset- Returns:
- the word or
null
if none - Since:
- 3.5
-