public class PsiPackageRenameValidator extends java.lang.Object implements RenameInputValidatorEx
EP_NAME
Constructor and Description |
---|
PsiPackageRenameValidator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage(java.lang.String newName,
Project project)
Called only if all input validators (
RenameInputValidator ) accept
the new name in RenameInputValidator.isInputValid(String, PsiElement, ProcessingContext)
and name is a valid identifier for a language of the element |
ElementPattern<? extends PsiElement> |
getPattern() |
boolean |
isInputValid(java.lang.String newName,
PsiElement element,
ProcessingContext context)
Is invoked for elements accepted by pattern
RenameInputValidator.getPattern() . |
public ElementPattern<? extends PsiElement> getPattern()
getPattern
in interface RenameInputValidator
public java.lang.String getErrorMessage(java.lang.String newName, Project project)
RenameInputValidatorEx
RenameInputValidator
) accept
the new name in RenameInputValidator.isInputValid(String, PsiElement, ProcessingContext)
and name is a valid identifier for a language of the elementgetErrorMessage
in interface RenameInputValidatorEx
public boolean isInputValid(java.lang.String newName, PsiElement element, ProcessingContext context)
RenameInputValidator
RenameInputValidator.getPattern()
.
Should return true if RenameInputValidatorEx
is intended to return custom error message,
otherwise default message "newName is not a valid identifier" would be shownisInputValid
in interface RenameInputValidator