/** * 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); } }
@Override public boolean performFinish() { fMainPage.performOk(); return super.performFinish(); }
public boolean canFinish() { IWizardPage page= getContainer().getCurrentPage(); return super.canFinish() && !(page instanceof ExternalizeWizardPage); } }
private void setConditionCheckingStatus(RefactoringStatus status, int style) { if ((style & CheckConditionsOperation.ALL_CONDITIONS) == CheckConditionsOperation.ALL_CONDITIONS) setConditionCheckingStatus(status); else if ((style & CheckConditionsOperation.INITIAL_CONDITONS) == CheckConditionsOperation.INITIAL_CONDITONS) setInitialConditionCheckingStatus(status); else if ((style & CheckConditionsOperation.FINAL_CONDITIONS) == CheckConditionsOperation.FINAL_CONDITIONS) setFinalConditionCheckingStatus(status); }
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); }
text.setLayoutData(gd); getRefactoringWizard().setForcePreviewReview(false);
GridData gd= new GridData(GridData.FILL_BOTH); fPageContainer.setLayoutData(gd); fCurrentPage= fWizard.getStartingPage(); dialogArea= fPageContainer; if (fCurrentPage instanceof PreviewWizardPage) { gd.widthHint= convertWidthInCharsToPixels(fWizard.getMessageLineWidthInChars()); fStatusContainer.setLayoutData(gd); if (fWizard.needsProgressMonitor()) createProgressMonitorPart(); createMessageBox();
super(parent, wizard); setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX); IDialogSettings settings= wizard.getDialogSettings(); if (settings == null) { settings= RefactoringUIPlugin.getDefault().getDialogSettings(); wizard.setDialogSettings(settings); int height= 400; String settingsSectionId= DIALOG_SETTINGS + '.'+ wizard.getRefactoring().getName(); fSettings= settings.getSection(settingsSectionId); if (fSettings == null) {
/** * 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(); }
result[0]= INITIAL_CONDITION_CHECKING_FAILED; } else { fWizard.setInitialConditionCheckingStatus(fInitialConditions); Dialog dialog= RefactoringUI.createRefactoringWizardDialog(fWizard, parent); dialog.create();
public boolean needsProgressMonitor() { DeleteRefactoring refactoring= (DeleteRefactoring)getRefactoring(); RefactoringProcessor processor= refactoring.getProcessor(); if (processor instanceof JavaDeleteProcessor) { return ((JavaDeleteProcessor)processor).needsProgressMonitor(); } return super.needsProgressMonitor(); }
private void updateUIStatus() { getRefactoringWizard().setForcePreviewReview(false); JavaMoveProcessor processor= getJavaMoveProcessor(); if (fReferenceCheckbox != null){ processor.setUpdateReferences(fReferenceCheckbox.getSelection()); } if (fQualifiedNameCheckbox != null){ boolean enabled= processor.canEnableQualifiedNameUpdating(); fQualifiedNameCheckbox.setEnabled(enabled); if (enabled) { fQualifiedNameComponent.setEnabled(processor.getUpdateQualifiedNames()); if (processor.getUpdateQualifiedNames()) getRefactoringWizard().setForcePreviewReview(true); } else { fQualifiedNameComponent.setEnabled(false); } processor.setUpdateQualifiedNames(fQualifiedNameCheckbox.getEnabled() && fQualifiedNameCheckbox.getSelection()); } }
/** * {@inheritDoc} */ protected void configureShell(Shell newShell) { super.configureShell(newShell); getRefactoringWizard().getRefactoring().setValidationContext(newShell); }
result[0] = INITIAL_CONDITION_CHECKING_FAILED; } else { fWizard.setInitialConditionCheckingStatus(fInitialConditions);
/** * 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); } }
@Override public boolean performFinish() { super.performFinish(); return ((ApiToolingSetupWizardPage) getStartingPage()).finish(); }
private void updateUIStatus() { getRefactoringWizard().setForcePreviewReview(false); JavaMoveProcessor processor= getJavaMoveProcessor(); if (fReferenceCheckbox != null){ processor.setUpdateReferences(fReferenceCheckbox.getSelection()); } if (fQualifiedNameCheckbox != null){ boolean enabled= processor.canEnableQualifiedNameUpdating(); fQualifiedNameCheckbox.setEnabled(enabled); if (enabled) { fQualifiedNameComponent.setEnabled(processor.getUpdateQualifiedNames()); if (processor.getUpdateQualifiedNames()) getRefactoringWizard().setForcePreviewReview(true); } else { fQualifiedNameComponent.setEnabled(false); } processor.setUpdateQualifiedNames(fQualifiedNameCheckbox.getEnabled() && fQualifiedNameCheckbox.getSelection()); } }
@Override public boolean canFinish() { IWizardPage page= getContainer().getCurrentPage(); return super.canFinish() && !(page instanceof ExternalizeWizardPage); }
throws InterruptedException { Assert.isNotNull(dialogTitle); final Refactoring refactoring = fWizard.getRefactoring(); final IJobManager manager = Job.getJobManager(); final int[] result = new int[1];
/** * 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); } }