RSE
Release 1.0

org.eclipse.rse.ui.validators
Class ValidatorCompileCommandLabel

java.lang.Object
  extended byorg.eclipse.rse.ui.validators.ValidatorUniqueString
      extended byorg.eclipse.rse.ui.validators.ValidatorCompileCommandLabel
All Implemented Interfaces:
ICellEditorValidator, IInputValidator, ISystemValidator, ISystemValidatorUniqueString

public class ValidatorCompileCommandLabel
extends ValidatorUniqueString
implements ISystemValidator

This class is used to verify a user defined compile command's label


Field Summary
protected  boolean fUnique
           
static int MAX_CMDLABEL_LENGTH
           
protected  SystemMessage msg_Invalid
           
protected  IWorkspace workspace
           
 
Fields inherited from class org.eclipse.rse.ui.validators.ValidatorUniqueString
CASE_INSENSITIVE, CASE_SENSITIVE, caseSensitive, currentMessage, existingList, msg_Empty, msg_NonUnique, QUOTE, syntaxValidator, useUpperCase
 
Constructor Summary
ValidatorCompileCommandLabel()
          Use this constructor when the name need not be unique, and you just want the syntax checking.
ValidatorCompileCommandLabel(String[] existingLabelList)
          Use this constructor when you have an array of existing labels.
ValidatorCompileCommandLabel(Vector existingLabelList)
          Use this constructor when you have a vector of existing labels.
 
Method Summary
protected  boolean checkForBadCharacters(String newText)
          Overridable method for invalidate character check, beyond what this class offers
 int getMaximumNameLength()
          Return the max length for compile commands: 50
 SystemMessage isSyntaxOk(String newText)
          Validate each character.
 void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
          Supply your own error message text.
 String toString()
           
 
Methods inherited from class org.eclipse.rse.ui.validators.ValidatorUniqueString
doMessageSubstitution, getExistingNamesList, getSystemMessage, getSystemMessageText, isValid, isValid, quotedToLowerCase, setCaseSensitive, setErrorMessages, setExistingNamesList, setExistingNamesList, setUseUpperCase, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.validators.ISystemValidator
getSystemMessage, validate
 
Methods inherited from interface org.eclipse.jface.dialogs.IInputValidator
isValid
 
Methods inherited from interface org.eclipse.jface.viewers.ICellEditorValidator
isValid
 

Field Detail

MAX_CMDLABEL_LENGTH

public static final int MAX_CMDLABEL_LENGTH
See Also:
Constant Field Values

fUnique

protected boolean fUnique

msg_Invalid

protected SystemMessage msg_Invalid

workspace

protected IWorkspace workspace
Constructor Detail

ValidatorCompileCommandLabel

public ValidatorCompileCommandLabel(Vector existingLabelList)
Use this constructor when you have a vector of existing labels.


ValidatorCompileCommandLabel

public ValidatorCompileCommandLabel(String[] existingLabelList)
Use this constructor when you have an array of existing labels.


ValidatorCompileCommandLabel

public ValidatorCompileCommandLabel()
Use this constructor when the name need not be unique, and you just want the syntax checking. Or if you will call setExistingNamesList later.

Method Detail

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 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 compile commands: 50

Specified by:
getMaximumNameLength in interface ISystemValidator
Overrides:
getMaximumNameLength in class ValidatorUniqueString

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.