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, startInWriteActiongetErrorMessage, tryCreatepublic MyValidator(Project project, PsiDirectory directory)
public boolean checkInput(java.lang.String inputString)
InputValidatorinputString is valid. It is invoked each time
input changes.checkInput in interface InputValidatorcheckInput in class CreateElementActionBase.MyInputValidatorinputString - the input to checkpublic java.lang.String getErrorText(java.lang.String inputString)
getErrorText in interface InputValidatorExpublic PsiElement[] create(java.lang.String newName) throws java.lang.Exception
create in class CreateElementActionBase.MyInputValidatorjava.lang.Exceptionpublic boolean canClose(java.lang.String inputString)
InputValidatorfalse is returned then then the message dialog will not be closed.canClose in interface InputValidatorcanClose in class CreateElementActionBase.MyInputValidatorinputString - the input to check