public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerIncrementalBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerIncrementalBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
/** * @param refactoring * @param wizard * @param parent * @param dialogTitle * @param saveMode a save mode from {@link RefactoringSaveHelper} * @return <code>true</code> if the refactoring was executed, <code>false</code> otherwise * @throws JavaModelException */ public boolean activate(Refactoring refactoring, RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) throws JavaModelException { RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode); if (! canActivate(saveHelper, parent)) return false; try { RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard); int result= op.run(parent, dialogTitle); fStatus= op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }