|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.wizard.Wizard
org.eclipse.ltk.ui.refactoring.RefactoringWizard
An abstract base implementation of a refactoring wizard. A refactoring wizard differs from a normal wizard in the following characteristics:
RefactoringWizardPage
can be added to a refactoring wizard. Trying to
add a different kind of page results in an exception.
A refactoring wizard is best opened using the RefactoringWizardOpenOperation
.
Clients may extend this class.
Refactoring
Field Summary | |
static int |
CHECK_INITIAL_CONDITIONS_ON_OPEN
Flag (value 1) indicating that the initial condition checking of the refactoring is done when the wizard opens. |
static int |
DIALOG_BASED_UESR_INTERFACE
Flag (value 4) indicating that a lightweight dialog based user interface should be used to present this refactoring wizard. |
static int |
NO_BACK_BUTTON_ON_STATUS_DIALOG
Flag (value 64) indicating that the dialog representing the refactoring status to the user will not contain a back button. |
static int |
NO_PREVIEW_PAGE
Flag (value 16) indicating that the wizard should not show a preview page. |
static int |
NONE
Flag (value 0) indicating that no special flags are provided. |
static int |
PREVIEW_EXPAND_FIRST_NODE
Flag (value 32) indicating that the first change node presented in the preview page should be fully expanded. |
static int |
WIZARD_BASED_USER_INTERFACE
Flag (value 2) indicating that a normal wizard based user interface consisting of a back, next, finish and cancel button should be used to present this refactoring wizard. |
static int |
YES_NO_BUTTON_STYLE
Flag (value 8) indicating that the finish and cancel button should be named yes and no. |
Fields inherited from class org.eclipse.jface.wizard.Wizard |
DEFAULT_IMAGE |
Constructor Summary | |
RefactoringWizard(Refactoring refactoring,
int flags)
Creates a new refactoring wizard for the given refactoring. |
Method Summary | |
void |
addPage(IWizardPage page)
This method asserts that the pages added to the refactoring wizard are instances of type RefactoringWizardPage . |
void |
addPages()
This method calls the hook method addUserInputPages() to allow
subclasses to add specific user input pages. |
protected abstract void |
addUserInputPages()
Hook method to add user input pages to this refactoring wizard. |
boolean |
canFinish()
|
Change |
getChange()
Returns the refactoring's change object or null if no change
object has been created yet. |
String |
getDefaultPageTitle()
Returns the default page title used for pages that don't provide their own page title. |
int |
getMessageLineWidthInChars()
Returns the width in characters to be used for the message line embedded into the refactoring wizard dialog. |
IWizardPage |
getPreviousPage(IWizardPage page)
|
Refactoring |
getRefactoring()
Returns the refactoring this wizard is associated with. |
IWizardPage |
getStartingPage()
|
Change |
internalCreateChange(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api,
CreateChangeOperation operation,
boolean updateStatus)
Note: This method is for internal use only. |
boolean |
internalGetExpandFirstNode(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
Note: This method is for internal use only. |
boolean |
internalHasPreviewPage(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
Note: This method is for internal use only. |
boolean |
internalIsYesNoStyle(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
Note: This method is for internal use only. |
org.eclipse.ltk.internal.ui.refactoring.FinishResult |
internalPerformFinish(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api,
PerformChangeOperation op)
Note: This method is for internal use only. |
void |
internalSetChange(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api,
Change change)
Note: This method is for internal use only. |
void |
internalSetPreviewShown(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api,
boolean shown)
Note: This method is for internal use only. |
boolean |
internalShowBackButtonOnStatusDialog(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
Note: This method is for internal use only. |
boolean |
performCancel()
|
boolean |
performFinish()
|
void |
setChangeCreationCancelable(boolean isChangeCreationCancelable)
If set to true the change creation is cancelable by the user.
|
void |
setDefaultPageTitle(String defaultPageTitle)
Sets the default page title to the given value. |
void |
setForcePreviewReview(boolean forcePreviewReview)
If set to true the Finish or OK button, respectively will
be disabled until the user has visited the preview page. |
void |
setInitialConditionCheckingStatus(RefactoringStatus status)
Sets the initial condition checking status computed by the refactoring. |
Methods inherited from class org.eclipse.jface.wizard.Wizard |
createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getShell, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int CHECK_INITIAL_CONDITIONS_ON_OPEN
public static final int WIZARD_BASED_USER_INTERFACE
DIALOG_BASED_UESR_INTERFACE
.
public static final int DIALOG_BASED_UESR_INTERFACE
WIZARD_BASED_USER_INTERFACE
.
public static final int YES_NO_BUTTON_STYLE
WIZARD_BASED_USER_INTERFACE
is specified.
public static final int NO_PREVIEW_PAGE
WIZARD_BASED_USER_INTERFACE
is specified.
public static final int PREVIEW_EXPAND_FIRST_NODE
public static final int NO_BACK_BUTTON_ON_STATUS_DIALOG
Constructor Detail |
public RefactoringWizard(Refactoring refactoring, int flags)
refactoring
- the refactoring the wizard is presentingflags
- flags specifying the behaviour of the wizard. If neither
WIZARD_BASED_USER_INTERFACE
nor DIALOG_BASED_UESR_INTERFACE
is specified then WIZARD_BASED_USER_INTERFACE
will be
taken as a default.Method Detail |
public final Refactoring getRefactoring()
public final void setDefaultPageTitle(String defaultPageTitle)
defaultPageTitle
- the default page title.Wizard.setDefaultPageImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
public final String getDefaultPageTitle()
null
if non has been setsetDefaultPageTitle(String)
public final void setForcePreviewReview(boolean forcePreviewReview)
true
the Finish or OK button, respectively will
be disabled until the user has visited the preview page. If set to
false
the refactoring can be performed before the preview
page has been visited.
forcePreviewReview
- if true
to user must confirm the
previewpublic int getMessageLineWidthInChars()
Subclasses may override this method and return a different value.
public final void setChangeCreationCancelable(boolean isChangeCreationCancelable)
true
the change creation is cancelable by the user.
By default, change creation is cancelable.
isChangeCreationCancelable
- determines whether the change creation
is cancelable by the user or not.Refactoring.createChange(IProgressMonitor)
public final void setInitialConditionCheckingStatus(RefactoringStatus status)
status
- the initial condition checking status.Refactoring.checkInitialConditions(IProgressMonitor)
,
CHECK_INITIAL_CONDITIONS_ON_OPEN
public final Change getChange()
null
if no change
object has been created yet.
null
Refactoring.createChange(IProgressMonitor)
public final void addPages()
addUserInputPages()
to allow
subclasses to add specific user input pages.
public final void addPage(IWizardPage page)
RefactoringWizardPage
.
protected abstract void addUserInputPages()
UserInputWizardPage
.
Adding pages of a different kind is not permitted and will result
in unexpected behaviour.
public IWizardPage getStartingPage()
public IWizardPage getPreviousPage(IWizardPage page)
public boolean canFinish()
public final Change internalCreateChange(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api, CreateChangeOperation operation, boolean updateStatus)
api
- internal instance to avoid access from external clientsoperation
- the create change operationupdateStatus
- flag indicating if status updating is requested
public final org.eclipse.ltk.internal.ui.refactoring.FinishResult internalPerformFinish(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api, PerformChangeOperation op)
api
- internal instance to avoid access from external clientsop
- the perform change operation
public boolean performFinish()
public boolean performCancel()
public final boolean internalHasPreviewPage(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
api
- internal instance to avoid access from external clients
public final boolean internalIsYesNoStyle(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
api
- internal instance to avoid access from external clients
public final boolean internalGetExpandFirstNode(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
api
- internal instance to avoid access from external clients
public final void internalSetChange(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api, Change change)
api
- internal instance to avoid access from external clientschange
- the change to setpublic final void internalSetPreviewShown(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api, boolean shown)
api
- internal instance to avoid access from external clientsshown
- a boolean indicating if the preview page has been shown or notpublic final boolean internalShowBackButtonOnStatusDialog(org.eclipse.ltk.internal.ui.refactoring.InternalAPI api)
api
- internal instance to avoid access from external clients
|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |