org.eclipse.xtext.ui.editor.doubleClicking
Class FixedCharCountPartitionDoubleClickSelector
java.lang.Object
org.eclipse.jface.text.DefaultTextDoubleClickStrategy
org.eclipse.xtext.ui.editor.doubleClicking.AbstractWordAwareDoubleClickStrategy
org.eclipse.xtext.ui.editor.doubleClicking.AbstractPartitionDoubleClickSelector
org.eclipse.xtext.ui.editor.doubleClicking.FixedCharCountPartitionDoubleClickSelector
- All Implemented Interfaces:
- org.eclipse.jface.text.ITextDoubleClickStrategy
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
.
- Author:
- Sebastian Zarnekow - Initial contribution and API
Method Summary |
protected org.eclipse.jface.text.IRegion |
getSelectedRegion(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.ITypedRegion completePartition)
|
Methods inherited from class org.eclipse.jface.text.DefaultTextDoubleClickStrategy |
doubleClicked |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedCharCountPartitionDoubleClickSelector
public FixedCharCountPartitionDoubleClickSelector(java.lang.String partitioning,
int leftBorder,
int rightBorder)
- Creates a new partition double click selector for the given document partitioning.
- Parameters:
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 partition
getSelectedRegion
protected org.eclipse.jface.text.IRegion getSelectedRegion(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.ITypedRegion completePartition)
throws org.eclipse.jface.text.BadLocationException
- Overrides:
getSelectedRegion
in class AbstractPartitionDoubleClickSelector
- Throws:
org.eclipse.jface.text.BadLocationException