use of org.eclipse.wst.xsd.ui.internal.refactor.handlers.RenameHandler in project webtools.sourceediting by eclipse.
the class RefactoringSection method invokeRenameRefactoring.
/**
* Invokes the refactor->rename action on the current selection.
*/
private void invokeRenameRefactoring() {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
XSDSchema schema = (XSDSchema) editor.getAdapter(XSDSchema.class);
ISelection selection = new StructuredSelection(input);
ISelectionMapper mapper = (ISelectionMapper) editor.getAdapter(ISelectionMapper.class);
selection = mapper != null ? mapper.mapSelection(selection) : selection;
RenameHandler renameHandler = new RenameHandler();
renameHandler.execute(selection, schema);
}
Aggregations