return IPHPRefactorings.RENAME_LOCAL_VARIABLE;
}
@Override
protected RefactoringStatus updateReferences(IProgressMonitor pm) throws CoreException {
ModuleDeclaration moduleDeclaration = SourceParserUtil.getModuleDeclaration(cu);
if (moduleDeclaration != null) {
IModelElement enclosingElement = modelElement.getParent();
final ISourceRange declarationSourceRange = ((IField) modelElement).getNameRange();
if (enclosingElement != null && declarationSourceRange != null) {
ISourceRange enclosingElementSourceRange = null;
if (enclosingElement.getElementType() == IModelElement.METHOD) {
enclosingElementSourceRange = ((IMethod) enclosingElement).getSourceRange();
} else if (enclosingElement.getElementType() == IModelElement.SOURCE_MODULE) {
enclosingElementSourceRange = ((ISourceModule) enclosingElement).getSourceRange();
}
if (enclosingElementSourceRange != null) {
final int enclosingElementSourceStart = enclosingElementSourceRange.getOffset();
final int enclosingElementSourceEnd = enclosingElementSourceRange.getOffset() + enclosingElementSourceRange.getLength();
try {
moduleDeclaration.traverse(new PHPASTVisitor() {
@Override
public boolean visit(ArrayVariableReference s) throws Exception {
return visit((VariableReference) s);
}