protected class CreateFileAction.MyValidator extends CreateElementActionBase.MyInputValidator implements InputValidatorEx
Constructor and Description |
---|
MyValidator(Project project,
PsiDirectory directory) |
Modifier and Type | Method and Description |
---|---|
boolean |
canClose(java.lang.String inputString)
This method is invoked just before message dialog is closed with OK code.
|
boolean |
checkInput(java.lang.String inputString)
Checks whether the
inputString is valid. |
PsiElement[] |
create(java.lang.String newName) |
java.lang.String |
getErrorText(java.lang.String inputString) |
getActionName, getCreatedElements, getDirectory, startInWriteAction
getErrorMessage, tryCreate
public MyValidator(Project project, PsiDirectory directory)
public boolean checkInput(java.lang.String inputString)
InputValidator
inputString
is valid. It is invoked each time
input changes.checkInput
in interface InputValidator
checkInput
in class CreateElementActionBase.MyInputValidator
inputString
- the input to checkpublic java.lang.String getErrorText(java.lang.String inputString)
getErrorText
in interface InputValidatorEx
public PsiElement[] create(java.lang.String newName) throws java.lang.Exception
create
in class CreateElementActionBase.MyInputValidator
java.lang.Exception
public boolean canClose(java.lang.String inputString)
InputValidator
false
is returned then then the message dialog will not be closed.canClose
in interface InputValidator
canClose
in class CreateElementActionBase.MyInputValidator
inputString
- the input to check