use of org.eclipse.xtext.ui.refactoring.impl.AbstractRenameProcessor in project xtext-xtend by eclipse.
the class JavaRefactoringIntegrationTest method createXtendRenameRefactoring.
protected ProcessorBasedRefactoring createXtendRenameRefactoring(final XtextEditor editor, final int offset, String newName) {
IRenameElementContext renameElementContext = createRenameElementContext(editor, offset);
ProcessorBasedRefactoring renameRefactoring = renameRefactoringProvider.getRenameRefactoring(renameElementContext);
RefactoringProcessor processor = renameRefactoring.getProcessor();
if (processor instanceof AbstractRenameProcessor)
((AbstractRenameProcessor) processor).setNewName(newName);
else if (processor instanceof JavaRenameProcessor)
((JavaRenameProcessor) processor).setNewElementName(newName);
return renameRefactoring;
}
use of org.eclipse.xtext.ui.refactoring.impl.AbstractRenameProcessor in project xtext-xtend by eclipse.
the class AbstractXtendRenameRefactoringTest method createXtendRenameRefactoring.
protected ProcessorBasedRefactoring createXtendRenameRefactoring(final XtextEditor editor, final int offset, String newName) {
IRenameElementContext renameElementContext = createRenameElementContext(editor, offset);
ProcessorBasedRefactoring renameRefactoring = renameRefactoringProvider.getRenameRefactoring(renameElementContext);
RefactoringProcessor processor = renameRefactoring.getProcessor();
if (processor instanceof AbstractRenameProcessor)
((AbstractRenameProcessor) processor).setNewName(newName);
else if (processor instanceof JavaRenameProcessor)
((JavaRenameProcessor) processor).setNewElementName(newName);
return renameRefactoring;
}
Aggregations