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(); }
protected boolean performFinish() { RefactoringWizard wizard= getRefactoringWizard(); Change change= wizard.getChange(); PerformChangeOperation operation= null; if (change != null) { operation= new UIPerformChangeOperation(getShell().getDisplay(), change, getContainer()); } else { CreateChangeOperation ccop= new CreateChangeOperation(getRefactoring()); operation= new UIPerformChangeOperation(getShell().getDisplay(), ccop, getContainer()); } FinishResult result= wizard.internalPerformFinish(InternalAPI.INSTANCE, operation); if (result.isException()) return true; if (result.isInterrupted()) return false; RefactoringStatus fValidationStatus= operation.getValidationStatus(); if (fValidationStatus != null && fValidationStatus.hasFatalError()) { MessageDialog.openError(wizard.getShell(), wizard.getWindowTitle(), Messages.format( RefactoringUIMessages.RefactoringUI_cannot_execute, fValidationStatus.getMessageMatchingSeverity(RefactoringStatus.FATAL))); return true; } return true; } }