public class LexerTokenAndCharacterPairAwareStrategy extends AbstractWordAwareDoubleClickStrategy
tokens
of an Xtext document to identify
words in the document. Thereby it recognizes keywords that consist only of characters
that are no letters, e.g. +=
or ?=
. Furthermore it will select
the contents of a brace pair if the opening or closing peer is clicked.
Tokens with a length of one character have a lower priority in case a token boundary is selected.Constructor and Description |
---|
LexerTokenAndCharacterPairAwareStrategy() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.jface.text.IRegion |
findExtendedDoubleClickSelection(org.eclipse.jface.text.IDocument document,
int offset) |
protected org.eclipse.jface.text.IRegion |
findWord(org.eclipse.jface.text.IDocument document,
int offset) |
protected org.eclipse.jface.text.source.ICharacterPairMatcher |
getCharacterPairMatcher() |
createBreakIterator
public LexerTokenAndCharacterPairAwareStrategy()
protected org.eclipse.jface.text.IRegion findWord(org.eclipse.jface.text.IDocument document, int offset)
findWord
in class AbstractWordAwareDoubleClickStrategy
protected org.eclipse.jface.text.IRegion findExtendedDoubleClickSelection(org.eclipse.jface.text.IDocument document, int offset)
findExtendedDoubleClickSelection
in class org.eclipse.jface.text.DefaultTextDoubleClickStrategy
protected org.eclipse.jface.text.source.ICharacterPairMatcher getCharacterPairMatcher()