protected void configureShell(Shell newShell) { super.configureShell(newShell); String title= fWizard.getDefaultPageTitle(); if (title == null) title= ""; //$NON-NLS-1$ newShell.setText(title); fWizard.getRefactoring().setValidationContext(newShell); }
/** * Actually activates the user interface. This default implementation * assumes that the configuration element passed to <code>initialize * </code> has an attribute wizard denoting the wizard class to be * used for the given refactoring. * <p> * Subclasses may override to open a different user interface * * @param refactoring the refactoring for which the user interface * should be opened * @param parent the parent shell to be used * @param saveMode a save mode from {@link RefactoringSaveHelper} * @return <code>true</code> iff the refactoring was executed, * <code>false</code> otherwise * * @exception CoreException if the user interface can't be activated */ public boolean activate(Refactoring refactoring, Shell parent, int saveMode) throws CoreException { String title= fWizard.getDefaultPageTitle(); if (title == null) title= ""; //$NON-NLS-1$ return new RefactoringStarter().activate(refactoring, fWizard, parent, title, saveMode); } }
/** * Actually activates the user interface. This default implementation * assumes that the configuration element passed to <code>initialize * </code> has an attribute wizard denoting the wizard class to be * used for the given refactoring. * <p> * Subclasses may override to open a different user interface * * @param refactoring the refactoring for which the user interface * should be opened * @param parent the parent shell to be used * @param saveMode a save mode from {@link RefactoringSaveHelper} * @return <code>true</code> iff the refactoring was executed, * <code>false</code> otherwise * * @exception CoreException if the user interface can't be activated */ public boolean activate(Refactoring refactoring, Shell parent, int saveMode) throws CoreException { String title= fWizard.getDefaultPageTitle(); if (title == null) title= ""; //$NON-NLS-1$ return new RefactoringStarter().activate(fWizard, parent, title, saveMode); } }
/** * Actually activates the user interface. This default implementation * assumes that the configuration element passed to <code>initialize * </code> has an attribute wizard denoting the wizard class to be * used for the given refactoring. * <p> * Subclasses may override to open a different user interface * * @param refactoring the refactoring for which the user interface * should be opened * @param parent the parent shell to be used * @param saveMode a save mode from {@link RefactoringSaveHelper} * @return <code>true</code> iff the refactoring was executed, * <code>false</code> otherwise * * @exception CoreException if the user interface can't be activated */ public boolean activate(Refactoring refactoring, Shell parent, int saveMode) throws CoreException { String title= fWizard.getDefaultPageTitle(); if (title == null) title= ""; //$NON-NLS-1$ return new RefactoringStarter().activate(fWizard, parent, title, saveMode); } }
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, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, //TODO: provide correct strings 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 } }
public void run(ISelection selection) { RenameTargetNamespaceProcessor processor = new RenameTargetNamespaceProcessor(getSchema(), getSchema().getTargetNamespace()); RenameRefactoring refactoring = new RenameRefactoring(processor); try { RefactoringWizard wizard = new RenameRefactoringWizard( refactoring, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle,//TODO: provide correct strings 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 } }
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, RefactoringWizardMessages.RenameComponentWizard_defaultPageTitle, // TODO: provide correct strings 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 } }
wizard); op.run(XSDEditorPlugin.getShell(), wizard .getDefaultPageTitle());