use of com.perl5.lang.perl.psi in project Perl5-IDEA by Camelcade.
the class PerlDelegatingLightNamedElement method setName.
@Override
public PsiElement setName(@NonNls @NotNull String newBaseName) throws IncorrectOperationException {
// fixme should be in com.perl5.lang.perl.psi.utils.PerlPsiUtil.renameElement()
PsiElement nameIdentifier = getNameIdentifier();
ElementManipulator<PsiElement> manipulator = ElementManipulators.getManipulator(nameIdentifier);
TextRange identifierRange = this instanceof PerlIdentifierRangeProvider ? ((PerlIdentifierRangeProvider) this).getRangeInIdentifier() : ElementManipulators.getValueTextRange(nameIdentifier);
myNameIdentifier = manipulator.handleContentChange(nameIdentifier, identifierRange, newBaseName);
myName = getNameComputation().fun(newBaseName);
return this;
}
Aggregations