| java.lang.Object isql.TabExpander
TabExpander | public class TabExpander implements ITabExpander(Code) | | this document has the ability to complete words or or expand abbreviations
from a list of possible expansions.
It is intended that the abbreviations come from a file
whereas the completion is 'smart'/context sensitive such as names of
tables and columns, or classnames/method names.
THis implementation uses a String[] but we should create a default
which uses a Model which can then be used for customization keeping
the String array as one constructor.
author: rahul kumar, 2001 |
_arrCache | String[] _arrCache(Code) | | stores all strings used by tab method, set by caller
|
_pattern | String _pattern(Code) | | stores the current word typed by user on which we are tabbing.
We would revert to this word if he doesnt accept any substitution
|
TabExpander | public TabExpander()(Code) | | |
expand | public String expand(String patt, int count)(Code) | | expands the given pattern, returning the match at count
position. USer would start with 0, and continue till null is
returned.
|
getExpansions | public String[] getExpansions()(Code) | | returns all expansions for the previously searched pattern
|
getExpansions | public String[] getExpansions(String patt)(Code) | | returns expansions for the given string. Has no impact on
existing searches.
|
getNextExpansion | public String getNextExpansion(String patt)(Code) | | returns expansions for a string. Caller would just send in a
string and keep calling this until a null is returned.
Caller would either call getNextExpansion or expand, whatever
suits his needs better.
|
setTabTable | public void setTabTable(String[] tabs)(Code) | | sets the cache - required at start of program.
|
|
|