org.eclipse.rse.ui.validators
Class ValidatorSourceType
java.lang.Object
org.eclipse.rse.ui.validators.ValidatorUniqueString
org.eclipse.rse.ui.validators.ValidatorSourceType
- All Implemented Interfaces:
- IInputValidator, ICellEditorValidator, ISystemValidator, ISystemValidatorUniqueString
public class ValidatorSourceType
- extends ValidatorUniqueString
- implements ISystemValidator
This class is used to verify a user-entered source type. This is typically
subsystem-dependent, such as "*.cpp" for a universal file subsystem.
However, this class is defined to be easily subclassed.
Methods inherited from class org.eclipse.rse.ui.validators.ValidatorUniqueString |
doMessageSubstitution, getExistingNamesList, getSystemMessage, getSystemMessageText, isValid, isValid, quotedToLowerCase, setCaseSensitive, setErrorMessages, setExistingNamesList, setExistingNamesList, setUseUpperCase, validate |
MAX_SRCTYPE_LENGTH
public static final int MAX_SRCTYPE_LENGTH
- See Also:
- Constant Field Values
msg_Invalid
protected SystemMessage msg_Invalid
ValidatorSourceType
public ValidatorSourceType(boolean caseSensitive)
- Constructor. You must specify if src types are case-sensitive or not.
Typically, you will also call setExistingNames to set the list of existing src types
for uniqueness-validation.
setErrorMessages
public void setErrorMessages(SystemMessage msg_Empty,
SystemMessage msg_NonUnique,
SystemMessage msg_Invalid)
- Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- Parameters:
msg_Empty
- error message when entry field is emptymsg_NonUnique
- error message when value entered is not uniquemsg_Invalid
- error message when syntax is not valid
checkForBadCharacters
protected boolean checkForBadCharacters(String newText)
- Overridable method for invalidate character check, beyond what this class offers
- Returns:
- true if valid, false if not
toString
public String toString()
- Overrides:
toString
in class ValidatorUniqueString
isSyntaxOk
public SystemMessage isSyntaxOk(String newText)
- Validate each character.
Override of parent method.
Override yourself to refine the error checking.
- Overrides:
isSyntaxOk
in class ValidatorUniqueString
getMaximumNameLength
public int getMaximumNameLength()
- Return the max length for folder names: 50
- Specified by:
getMaximumNameLength
in interface ISystemValidator
- Overrides:
getMaximumNameLength
in class ValidatorUniqueString
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.