/** * {@inheritDoc} */ public boolean canFlipToNextPage() { if (fIsLastUserInputPage) { // we can't call getNextPage to determine if flipping is allowed since computing // the next page is quite expensive (checking preconditions and creating a // change). So we say yes if the page is complete. return isPageComplete(); } else { return super.canFlipToNextPage(); } }
/** * {@inheritDoc} */ public IWizardPage getNextPage() { if (fIsLastUserInputPage) return computeSuccessorPage(); else return super.getNextPage(); }
/** * Returns the refactoring associated with this wizard page. Returns * <code>null</code> if the page isn't been added to any refactoring * wizard yet. * * @return the refactoring associated with this refactoring wizard page * or <code>null</code> */ protected Refactoring getRefactoring() { RefactoringWizard wizard= getRefactoringWizard(); if (wizard == null) return null; return wizard.getRefactoring(); }
/** * {@inheritDoc} */ public void setVisible(boolean visible) { if (visible) getRefactoringWizard().internalSetChange(InternalAPI.INSTANCE, null); super.setVisible(visible); }
/** * Returns the page's refactoring wizard. * * @return the page's refactoring wizard or <code>null</code> if the * wizard hasn't been set yet */ protected RefactoringWizard getRefactoringWizard() { IWizard wizard= getWizard(); if (wizard instanceof RefactoringWizard) return (RefactoringWizard) wizard; return null; }
public boolean performFinish() { Assert.isNotNull(fRefactoring); RefactoringWizardPage page= (RefactoringWizardPage)getContainer().getCurrentPage(); return page.performFinish(); }
/** * Returns the refactoring wizard's dialog settings. * * @return the refactoring wizard's dialog settings or <code>null</code> * if no settings are associated with the refactoring wizard dialog */ protected IDialogSettings getRefactoringSettings() { IDialogSettings settings= getDialogSettings(); if (settings == null) return null; IDialogSettings result= settings.getSection(REFACTORING_SETTINGS); if (result == null) { result= new DialogSettings(REFACTORING_SETTINGS); settings.addSection(result); } return result; } }
public void setVisible(boolean visible) { if (visible) { fViewer.setStatus(fStatus); } else { // the page was not complete if we show a fatal error. In this // case we can finish anyway. To enable the OK and Preview button // on the user input page we have to mark the page as complete again. if (!isPageComplete() && fStatus.hasFatalError()) setPageComplete(true); } super.setVisible(visible); }
super.setVisible(visible); fTreeViewer.getControl().setFocus(); } else { fPageContainer.showPage(fNullPage); super.setVisible(visible);
public boolean canFlipToNextPage() { // We have to call super.getNextPage since computing the next // page is expensive. So we avoid it as long as possible. return fStatus != null && fStatus.getSeverity() < RefactoringStatus.FATAL && isPageComplete() && super.getNextPage() != null; }
public IWizardPage getNextPage() { RefactoringWizard wizard= getRefactoringWizard(); Change change= wizard.getChange(); if (change == null) { change= wizard.internalCreateChange(InternalAPI.INSTANCE, new CreateChangeOperation(getRefactoring()), false); wizard.internalSetChange(InternalAPI.INSTANCE, change); } if (change == null) return this; return super.getNextPage(); }