public class FixedCharCountPartitionDoubleClickSelector extends AbstractPartitionDoubleClickSelector
Custom partition selector
that allows to strip a fixed set of characters
from the beginning and the end of a partition.
The implementation was heavily adapted from
org.eclipse.jdt.internal.ui.text.java.PartitionDoubleClickSelector
Constructor and Description |
---|
FixedCharCountPartitionDoubleClickSelector(java.lang.String partitioning,
int leftBorder,
int rightBorder)
Creates a new partition double click selector for the given document partitioning.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.jface.text.IRegion |
getSelectedRegion(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.ITypedRegion completePartition) |
findExtendedDoubleClickSelection
createBreakIterator, findWord
public FixedCharCountPartitionDoubleClickSelector(java.lang.String partitioning, int leftBorder, int rightBorder)
partitioning
- the document partitioningleftBorder
- number of characters to ignore from the left border of the partitionrightBorder
- number of characters to ignore from the right border of the partitionprotected org.eclipse.jface.text.IRegion getSelectedRegion(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.ITypedRegion completePartition) throws org.eclipse.jface.text.BadLocationException
getSelectedRegion
in class AbstractPartitionDoubleClickSelector
org.eclipse.jface.text.BadLocationException