use of org.eclipse.jdt.internal.corext.refactoring.rename.RenameLocalVariableProcessor in project che by eclipse.
the class RenameLocalVariableRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenameLocalVariableProcessor processor = new RenameLocalVariableProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.jdt.internal.corext.refactoring.rename.RenameLocalVariableProcessor in project che by eclipse.
the class RenameSupport method create.
/**
* Creates a new rename support for the given {@link ILocalVariable}.
*
* @param variable the {@link ILocalVariable} to be renamed.
* @param newName the variable's new name. <code>null</code> is a valid value
* indicating that no new name is provided.
* @param flags flags controlling additional parameters. Valid flags are
* <code>UPDATE_REFERENCES</code>, or <code>NONE</code>.
* @return the {@link RenameSupport}.
* @throws CoreException if an unexpected error occurred while creating
* the {@link RenameSupport}.
* @since 3.1
*/
public static RenameSupport create(ILocalVariable variable, String newName, int flags) throws CoreException {
RenameLocalVariableProcessor processor = new RenameLocalVariableProcessor(variable);
processor.setUpdateReferences(updateReferences(flags));
return new RenameSupport(processor, newName, flags);
}
Aggregations