Search in sources :

Example 1 with MakeTypeGlobalProcessor

use of org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeTypeGlobalProcessor in project webtools.sourceediting by eclipse.

the class MakeAnonymousTypeGlobalAction method run1.

public void run1() {
    if (fSelectedComponent == null) {
        return;
    }
    if (fSelectedComponent.getSchema() == null) {
        getSchema().updateElement(true);
    }
    MakeTypeGlobalProcessor processor = new MakeTypeGlobalProcessor(fSelectedComponent, getNewDefaultName());
    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) 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) MakeTypeGlobalProcessor(org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeTypeGlobalProcessor)

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 MakeTypeGlobalProcessor (org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeTypeGlobalProcessor)1 RenameRefactoringWizard (org.eclipse.wst.xsd.ui.internal.refactor.wizard.RenameRefactoringWizard)1