|
 |
|
| |
org.eclipse.rse.ui.validators
Class ValidatorFolderName
java.lang.Object
org.eclipse.rse.ui.validators.ValidatorUniqueString
org.eclipse.rse.ui.validators.ValidatorFolderName
-
All Implemented Interfaces:
-
IInputValidator,
ICellEditorValidator,
ISystemValidator,
ISystemValidatorUniqueString
-
Direct Known Subclasses:
-
ValidatorProfileName
-
public class ValidatorFolderName
- extends
ValidatorUniqueString
- implements
ISystemValidator
This class is used in dialogs that prompt for a name that eventually needs to become a folder.
Relies on Eclipse supplied method to test for folder name validity.
The IInputValidator interface is used by jface's
InputDialog class and numerous other platform and system classes.
|
Methods inherited from class org.eclipse.rse.ui.validators.
ValidatorUniqueString
|
doMessageSubstitution,
getExistingNamesList,
getSystemMessage,
getSystemMessageText,
isValid,
isValid,
quotedToLowerCase,
setCaseSensitive,
setErrorMessages,
setExistingNamesList,
setExistingNamesList,
setUseUpperCase,
validate
|
MAX_FOLDERNAME_LENGTH
public static final int MAX_FOLDERNAME_LENGTH
-
See Also:
-
Constant Field Values
fUnique
protected boolean fUnique
msg_Invalid
protected
SystemMessage msg_Invalid
workspace
protected
IWorkspace workspace
ValidatorFolderName
public ValidatorFolderName(
Collection existingNameList)
- Use this constructor when the name must be unique. Give the
-
Parameters:
-
existingNameList - a collection of existing names to compare against.
This will not be modified by the validator.
ValidatorFolderName
public ValidatorFolderName(
String[] existingNameList)
- Use this constructor when the name must be unique. Give the
constructor a string array of existing names to compare against.
ValidatorFolderName
public ValidatorFolderName()
- Use this constructor when the name need not be unique, and you just want
the syntax checking.
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 empty -
msg_NonUnique - error message when value entered is not unique -
msg_Invalid - error message when syntax is not valid
checkForBadCharacters
protected boolean checkForBadCharacters(
String newText)
- Overridable extension point to check for invalidate characters beyond what Eclipse checks for
-
-
-
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: 256
-
-
Specified by:
-
getMaximumNameLength
in interface
ISystemValidator
-
Overrides:
-
getMaximumNameLength
in class
ValidatorUniqueString
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|