public interface WordLocator
WordLocator
interface provides the methods for
allowing each language to define its own word boundaries for
word-based navigation. For example, in the natural language, text
like "it's" or "1.0" forms an entire word, while in Java, text like
"java.lang.String" forms three separate words. Note that these methods all bias to the right currently. This may be an issue for bi-directional languages that needs to be resolved at some point.
LanguageModule
,
LanguageSupport
Modifier and Type | Method and Description |
---|---|
int |
getNextWordEnd(int offset)
Fetches the next offset where a word ends.
|
int |
getNextWordStart(int offset)
Fetches the next offset where a word starts from.
|
int |
getPreviousWordEnd(int offset)
Fetches the previous offset where a word ends.
|
int |
getPreviousWordStart(int offset)
Fetches the previous offset where a word starts from.
|
int |
getWordEnd(int offset)
Fetches the end of the word for the given offset location.
|
int |
getWordStart(int offset)
Fetches the start of the word for the given offset location.
|
int getWordStart(int offset)
offset
- the specified document offsetint getWordEnd(int offset)
offset
- the specified document offsetint getNextWordStart(int offset)
offset
- the specified document offsetint getNextWordEnd(int offset)
offset
- the specified document offsetint getPreviousWordStart(int offset)
offset
- the specified document offsetint getPreviousWordEnd(int offset)
offset
- the specified document offset