|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The 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
Method Summary | |
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. |
Method Detail |
public int getWordStart(int offset)
offset
- the specified document offset
public int getWordEnd(int offset)
offset
- the specified document offset
public int getNextWordStart(int offset)
offset
- the specified document offset
public int getNextWordEnd(int offset)
offset
- the specified document offset
public int getPreviousWordStart(int offset)
offset
- the specified document offset
public int getPreviousWordEnd(int offset)
offset
- the specified document offset
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.