org.eclipse.xtext.ui.editor.doubleClicking
Class AbstractWordAwareDoubleClickStrategy

java.lang.Object
  extended by org.eclipse.jface.text.DefaultTextDoubleClickStrategy
      extended by org.eclipse.xtext.ui.editor.doubleClicking.AbstractWordAwareDoubleClickStrategy
All Implemented Interfaces:
org.eclipse.jface.text.ITextDoubleClickStrategy
Direct Known Subclasses:
AbstractPartitionDoubleClickSelector, LexerTokenAndCharacterPairAwareStrategy

public class AbstractWordAwareDoubleClickStrategy
extends org.eclipse.jface.text.DefaultTextDoubleClickStrategy

Customized DefaultTextDoubleClickStrategy that uses a word iterator instead of a plain break iterator to tokenize the document content. It is based on the plain text content of the document, e.g. terminal tokens are not taken into account.

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
AbstractWordAwareDoubleClickStrategy()
           
 
Method Summary
protected  CommonBreakIterator createBreakIterator()
           
protected  org.eclipse.jface.text.IRegion findWord(org.eclipse.jface.text.IDocument document, int offset)
           
 
Methods inherited from class org.eclipse.jface.text.DefaultTextDoubleClickStrategy
doubleClicked, findExtendedDoubleClickSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWordAwareDoubleClickStrategy

public AbstractWordAwareDoubleClickStrategy()
Method Detail

findWord

protected org.eclipse.jface.text.IRegion findWord(org.eclipse.jface.text.IDocument document,
                                                  int offset)
Overrides:
findWord in class org.eclipse.jface.text.DefaultTextDoubleClickStrategy

createBreakIterator

protected CommonBreakIterator createBreakIterator()
Returns:
a new break iterator. Defaults to an instance that does not take camel humps into account.