use of org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments in project che by eclipse.
the class RenameFieldRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenameFieldProcessor processor = new RenameFieldProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments in project che by eclipse.
the class RenameMethodRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws JavaModelException {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
String input = arguments.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);
IMethod method = (IMethod) JavaRefactoringDescriptorUtil.handleToElement(arguments.getProject(), input);
if (method == null) {
status.addFatalError(Messages.format(RefactoringCoreMessages.RenameMethodRefactoringContribution_could_not_create, new Object[] { BasicElementLabels.getResourceName(arguments.getProject()), input }));
return null;
}
JavaRenameProcessor processor;
if (MethodChecks.isVirtual(method)) {
processor = new RenameVirtualMethodProcessor(method, arguments, status);
} else {
processor = new RenameNonVirtualMethodProcessor(method, arguments, status);
}
return new RenameRefactoring(processor);
}
use of org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments in project che by eclipse.
the class RenamePackageRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenamePackageProcessor processor = new RenamePackageProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments in project che by eclipse.
the class RenameCompilationUnitRefactoringContribution method createRefactoring.
/**
* {@inheritDoc}
*/
@Override
public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
RenameCompilationUnitProcessor processor = new RenameCompilationUnitProcessor(arguments, status);
return new RenameRefactoring(processor);
}
use of org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments 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);
}
Aggregations