Search in sources :

Example 1 with RenameTargetNamespaceProcessor

use of org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameTargetNamespaceProcessor in project webtools.sourceediting by eclipse.

the class RenameTargetNamespaceAction method run.

public void run(ISelection selection) {
    RenameTargetNamespaceProcessor processor = new RenameTargetNamespaceProcessor(getSchema(), getSchema().getTargetNamespace());
    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());
        triggerBuild();
    } catch (InterruptedException e) {
    // do nothing. User action got cancelled
    }
}
Also used : RefactoringWizardOpenOperation(org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation) RenameRefactoringWizard(org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard) RenameTargetNamespaceProcessor(org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameTargetNamespaceProcessor) RenameRefactoringWizard(org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard) RefactoringWizard(org.eclipse.ltk.ui.refactoring.RefactoringWizard) RenameRefactoring(org.eclipse.ltk.core.refactoring.participants.RenameRefactoring)

Aggregations

RenameRefactoring (org.eclipse.ltk.core.refactoring.participants.RenameRefactoring)1 RefactoringWizard (org.eclipse.ltk.ui.refactoring.RefactoringWizard)1 RefactoringWizardOpenOperation (org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation)1 RenameTargetNamespaceProcessor (org.eclipse.wst.xsd.ui.internal.refactor.rename.RenameTargetNamespaceProcessor)1 RenameRefactoringWizard (org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard)1