Package org.eclipse.jface.text
Class DefaultTextDoubleClickStrategy
- java.lang.Object
-
- org.eclipse.jface.text.DefaultTextDoubleClickStrategy
-
- All Implemented Interfaces:
ITextDoubleClickStrategy
public class DefaultTextDoubleClickStrategy extends Object implements ITextDoubleClickStrategy
Standard implementation ofITextDoubleClickStrategy.Selects words using
java.text.BreakIteratorfor the default locale.- See Also:
BreakIterator
-
-
Constructor Summary
Constructors Constructor Description DefaultTextDoubleClickStrategy()Creates a new default text double click strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoubleClicked(ITextViewer text)The mouse has been double clicked on the given text viewer.protected IRegionfindExtendedDoubleClickSelection(IDocument document, int offset)Tries to find a suitable double click selection for the given offset.protected IRegionfindWord(IDocument document, int offset)Tries to find the word at the given offset.
-
-
-
Method Detail
-
doubleClicked
public void doubleClicked(ITextViewer text)
Description copied from interface:ITextDoubleClickStrategyThe mouse has been double clicked on the given text viewer.- Specified by:
doubleClickedin interfaceITextDoubleClickStrategy- Parameters:
text- the viewer into which has been double clicked
-
findExtendedDoubleClickSelection
protected IRegion findExtendedDoubleClickSelection(IDocument document, int offset)
Tries to find a suitable double click selection for the given offset.Note: This method must return
nullif it simply selects the word at the given offset.- Parameters:
document- the documentoffset- the offset- Returns:
- the selection or
nullif none to indicate simple word selection - Since:
- 3.5
-
-