org.eclipse.xtext.ui.editor.doubleClicking
Class AbstractPartitionDoubleClickSelector
java.lang.Object
org.eclipse.jface.text.DefaultTextDoubleClickStrategy
org.eclipse.xtext.ui.editor.doubleClicking.AbstractWordAwareDoubleClickStrategy
org.eclipse.xtext.ui.editor.doubleClicking.AbstractPartitionDoubleClickSelector
- All Implemented Interfaces:
- org.eclipse.jface.text.ITextDoubleClickStrategy
- Direct Known Subclasses:
- FixedCharCountPartitionDoubleClickSelector
public abstract class AbstractPartitionDoubleClickSelector
- extends AbstractWordAwareDoubleClickStrategy
This strategy
treats partition boundaries
in a special way. It allows to select a complete partition at once.
Implementors may override getSelectedRegion(IDocument, ITypedRegion)
to customize the
contents of the partition that should be selected.
The implementation was heavily adapted from org.eclipse.jdt.internal.ui.text.java.PartitionDoubleClickSelector
- Author:
- Sebastian Zarnekow - Initial contribution and API
- See Also:
FixedCharCountPartitionDoubleClickSelector
Constructor Summary |
protected |
AbstractPartitionDoubleClickSelector(java.lang.String partitioning)
Creates a new partition double click selector for the given document partitioning. |
Method Summary |
protected org.eclipse.jface.text.IRegion |
findExtendedDoubleClickSelection(org.eclipse.jface.text.IDocument document,
int offset)
|
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 |
AbstractPartitionDoubleClickSelector
protected AbstractPartitionDoubleClickSelector(java.lang.String partitioning)
- Creates a new partition double click selector for the given document partitioning.
- Parameters:
partitioning
- the document partitioning
findExtendedDoubleClickSelection
protected org.eclipse.jface.text.IRegion findExtendedDoubleClickSelection(org.eclipse.jface.text.IDocument document,
int offset)
- Overrides:
findExtendedDoubleClickSelection
in class org.eclipse.jface.text.DefaultTextDoubleClickStrategy
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
- Throws:
org.eclipse.jface.text.BadLocationException