use of org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameResourceProcessor in project webtools.sourceediting by eclipse.
the class RenameResourceAction method run.
public void run(IStructuredSelection selection) {
IResource resource = getResource(selection);
RenameResourceProcessor processor = new RenameResourceProcessor(resource);
if (!processor.isApplicable())
return;
RenameRefactoring refactoring = new RenameRefactoring(processor);
try {
RefactoringWizard wizard = new RenameRefactoringWizard(refactoring, // TODO: provide correct strings
RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, RefactoringWizardMessages.RenameComponentWizard_inputPage_description, null);
RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
op.run(XSDEditorPlugin.getShell(), wizard.getDefaultPageTitle());
} catch (InterruptedException e) {
// do nothing. User action got cancelled
}
}
use of org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameResourceProcessor in project webtools.sourceediting by eclipse.
the class RenameResourceAction method selectionChanged.
public void selectionChanged(IStructuredSelection selection) {
IResource element = getResource(selection);
if (element == null) {
setEnabled(false);
} else {
RenameResourceProcessor processor = new RenameResourceProcessor(element);
setEnabled(processor.isApplicable());
}
}
Aggregations