|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.MassagerFoldCase
org.eclipse.rse.ui.MassagerFoldCaseOutsideQuotes
public class MassagerFoldCaseOutsideQuotes
This massager folds the input text into either uppercase or lowercase, but ONLY for those portions of the string that are not inside delimiters.
The default delimiter characters checked for are single or double quote characters, but this can be changed by a setter method. When any of the delimiter characters are first found we enter delimited (non-folding) mode, until the same non-escaped delimiter character is found.
This massager assumes an imbedded delimiter is denoted by a doubled up delimiter. If this is not the case, a setter can be used for the escape character.
This massager takes more time than the MassageFoldCaseUnlessQuoted massager, as that one just checks if the entire string is delimited, while this one attempts to check for ranges of delimiting.
Constructor Summary | |
---|---|
MassagerFoldCaseOutsideQuotes()
Constructor using uppercase and using single and double quotes as delimiters |
|
MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase)
Constructor using given case direction, using single and double quotes as delimiters |
|
MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase,
char[] delimiters)
Constructor using given case direction, using given delimiters |
Method Summary | |
---|---|
protected String |
doFolding(String input,
boolean upperCase)
Method that actually walks the given string, character by character, folding all those which are not inside delimiters |
char[] |
getDelimiters()
Get the delimiter characters |
char |
getEscapeCharacter()
Get the escape character |
protected boolean |
hasAnyDelimiters(String input)
Check for existence of any delimiters |
protected boolean |
isDelimiter(char currChar)
Check if given character is one of the delimiters |
void |
setDelimiters(char[] delimiters)
Set the delimiter characters |
void |
setEscapeCharacter(char escapeChar)
Set the escape character used for denoted an imbedded delimiter. |
protected String |
toLowerCase(String input)
Overrridable method that actually does the lowercasing |
protected String |
toUpperCase(String input)
Overrridable method that actually does the uppercasing |
Methods inherited from class org.eclipse.rse.ui.MassagerFoldCase |
---|
getFoldToUpperCase, getTrimBlanks, massage, setFoldToUpperCase, setTrimBlanks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MassagerFoldCaseOutsideQuotes()
public MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase)
foldToUpperCase
- - whether to fold to uppercase (true) or lowercase (false).public MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase, char[] delimiters)
foldToUpperCase
- - whether to fold to uppercase (true) or lowercase (false).delimiters
- - chars to trigger delimited mode. Delimited sections are not folded.Method Detail |
---|
public void setDelimiters(char[] delimiters)
delimiters
- - chars to trigger delimited mode. Delimited sections are not folded.public void setEscapeCharacter(char escapeChar)
escapeChar
- - char that escapes the delimiter. Eg '\'public char[] getDelimiters()
public char getEscapeCharacter()
protected String toUpperCase(String input)
toUpperCase
in class MassagerFoldCase
protected String toLowerCase(String input)
toLowerCase
in class MassagerFoldCase
protected boolean hasAnyDelimiters(String input)
protected String doFolding(String input, boolean upperCase)
protected boolean isDelimiter(char currChar)
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |