|
Eclipse Platform Release 3.2 |
|||||||||||
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.history.RefactoringHistoryWizard
A default implementation of a refactoring history wizard. Refactoring history wizards are used to execute the refactorings described by a refactoring history. A refactoring history wizard differs from a normal wizard in the following characteristics:
A refactoring history wizard is usually opened using the WizardDialog
.
Clients must ensure that the calling thread holds the workspace lock.
Note: this class is intended to be extended by clients.
Refactoring
,
RefactoringHistory
Field Summary | |
---|---|
static int |
STATUS_CODE_INTERRUPTED
The status code representing an interrupted operation. |
Fields inherited from class org.eclipse.jface.wizard.Wizard |
---|
DEFAULT_IMAGE |
Constructor Summary | |
---|---|
RefactoringHistoryWizard(boolean overview,
String caption,
String title,
String description)
Creates a new refactoring history wizard. |
|
RefactoringHistoryWizard(String caption,
String title,
String description)
Creates a new refactoring history wizard. |
Method Summary | |
---|---|
protected RefactoringStatus |
aboutToPerformHistory(IProgressMonitor monitor)
Hook method which is called before the first refactoring of the history is executed. |
protected RefactoringStatus |
aboutToPerformRefactoring(Refactoring refactoring,
RefactoringDescriptor descriptor,
IProgressMonitor monitor)
Hook method which is called before the a refactoring of the history is executed. |
void |
addPage(IWizardPage page)
Adds a new page to this wizard. The page is inserted at the end of the page list. Clients must contribute their wizard pages by re-implementing addUserDefinedPages() . |
void |
addPages()
The Wizard implementation of this IWizard
method does nothing. Subclasses should extend if extra pages need to be
added before the wizard opens. New pages should be added by calling
addPage . |
protected void |
addUserDefinedPages()
Adds user defined wizard pages in front of the wizard. |
boolean |
canFinish()
|
protected Refactoring |
createRefactoring(RefactoringDescriptor descriptor,
RefactoringStatus status)
Method which is called to create a refactoring instance from a refactoring descriptor. |
void |
dispose()
The Wizard implementation of this IWizard
method disposes all the pages controls using
DialogPage.dispose . Subclasses should extend this method
if the wizard instance maintains addition SWT resource that need to be
disposed. |
org.eclipse.ltk.internal.ui.refactoring.IErrorWizardPage |
getErrorPage()
Returns the error wizard page. |
IWizardPage |
getNextPage(IWizardPage page)
|
org.eclipse.ltk.internal.ui.refactoring.IPreviewWizardPage |
getPreviewPage()
Returns the preview wizard page. |
IWizardPage |
getPreviousPage(IWizardPage page)
|
protected RefactoringStatus |
historyPerformed(IProgressMonitor monitor)
Hook method which is called when all refactorings of the history have been executed. |
boolean |
performCancel()
The Wizard implementation of this IWizard
method does nothing and returns true . Subclasses should
reimplement this method if they need to perform any special cancel
processing for their wizard. |
boolean |
performFinish()
Subclasses must implement this IWizard method to perform
any special finish processing for their wizard. |
RefactoringStatus |
performPreviewChange(Change change,
Refactoring refactoring)
Performs the change previously displayed in the preview. |
protected RefactoringStatus |
refactoringPerformed(Refactoring refactoring,
IProgressMonitor monitor)
Hook method which is called when the specified refactoring has been performed, e.g. its change object has been successfully applied to the workspace. |
protected boolean |
selectPreviewChange(Change change)
Hook method which is called for each change before it is displayed in a preview page. |
protected boolean |
selectStatusEntry(RefactoringStatusEntry entry)
Hook method which is called for each status entry before it is displayed in a wizard page. |
void |
setConfiguration(RefactoringHistoryControlConfiguration configuration)
Sets the refactoring history control configuration. |
void |
setInput(RefactoringHistory history)
Sets the refactoring history. |
Methods inherited from class org.eclipse.jface.wizard.Wizard |
---|
createPageControls, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getShell, getStartingPage, 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 STATUS_CODE_INTERRUPTED
Note: This API must not be used from outside the refactoring framework.
Constructor Detail |
public RefactoringHistoryWizard(boolean overview, String caption, String title, String description)
Clients must ensure that the refactoring history and the refactoring history control configuration are set before opening the wizard in a dialog.
overview
- true
to show an overview of the refactorings,
false
otherwisecaption
- the caption of the wizard windowtitle
- the title of the overview pagedescription
- the description of the overview pagesetConfiguration(RefactoringHistoryControlConfiguration)
,
setInput(RefactoringHistory)
public RefactoringHistoryWizard(String caption, String title, String description)
Clients must ensure that the refactoring history and the refactoring history control configuration are set before opening the wizard in a dialog.
Calling his constructor is equivalent to
RefactoringHistoryWizard(boolean, String, String, String)
with
the first argument equal to true
.
caption
- the caption of the wizard windowtitle
- the title of the overview pagedescription
- the description of the overview pagesetConfiguration(RefactoringHistoryControlConfiguration)
,
setInput(RefactoringHistory)
Method Detail |
protected RefactoringStatus aboutToPerformHistory(IProgressMonitor monitor)
This method is guaranteed to be called exactly once during the lifetime
of a refactoring history wizard. The default implementation does nothing
and returns a refactoring status of severity RefactoringStatus.OK
.
Subclasses may reimplement this method to perform any special processing.
Returning a status of severity RefactoringStatus.FATAL
will
terminate the execution of the refactorings.
monitor
- the progress monitor to use
protected RefactoringStatus aboutToPerformRefactoring(Refactoring refactoring, RefactoringDescriptor descriptor, IProgressMonitor monitor)
RefactoringStatus.OK
. This method may be
called from non-UI threads.
Subclasses may extend this method to perform any special processing.
Returning a status of severity RefactoringStatus.FATAL
will
terminate the execution of the current refactoring.
refactoring
- the refactoring about to be executeddescriptor
- the refactoring descriptormonitor
- the progress monitor to use
public final void addPage(IWizardPage page)
addUserDefinedPages()
.
addPage
in class Wizard
page
- the new pagepublic final void addPages()
Wizard
implementation of this IWizard
method does nothing. Subclasses should extend if extra pages need to be
added before the wizard opens. New pages should be added by calling
addPage
.
addPages
in interface IWizard
addPages
in class Wizard
protected void addUserDefinedPages()
Clients may extend this method to add custom wizard pages in front of the wizard.
public boolean canFinish()
canFinish
in interface IWizard
canFinish
in class Wizard
protected Refactoring createRefactoring(RefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException
Subclasses may reimplement this method to customize the initialization of a refactoring.
descriptor
- the refactoring descriptorstatus
- a refactoring status describing the outcome of the
initialization
null
if this refactoring
descriptor represents the unknown refactoring, or if no
refactoring contribution is available for this refactoring
descriptor
CoreException
- if an error occurs while creating the refactoring instancepublic void dispose()
Wizard
implementation of this IWizard
method disposes all the pages controls using
DialogPage.dispose
. Subclasses should extend this method
if the wizard instance maintains addition SWT resource that need to be
disposed.
dispose
in interface IWizard
dispose
in class Wizard
public final org.eclipse.ltk.internal.ui.refactoring.IErrorWizardPage getErrorPage()
Note: This API must not be called from outside the refactoring framework.
public IWizardPage getNextPage(IWizardPage page)
getNextPage
in interface IWizard
getNextPage
in class Wizard
public final org.eclipse.ltk.internal.ui.refactoring.IPreviewWizardPage getPreviewPage()
Note: This API must not be called from outside the refactoring framework.
public IWizardPage getPreviousPage(IWizardPage page)
getPreviousPage
in interface IWizard
getPreviousPage
in class Wizard
protected RefactoringStatus historyPerformed(IProgressMonitor monitor)
This method is guaranteed to be called exactly once during the lifetime
of a refactoring history wizard. It is not guaranteed that the user
interface has not already been disposed of. The default implementation
does nothing and returns a refactoring status of severity
RefactoringStatus.OK
.
Subclasses may reimplement this method to perform any special processing.
monitor
- the progress monitor to use
public boolean performCancel()
Wizard
implementation of this IWizard
method does nothing and returns true
. Subclasses should
reimplement this method if they need to perform any special cancel
processing for their wizard.
performCancel
in interface IWizard
performCancel
in class Wizard
public boolean performFinish()
IWizard
method to perform
any special finish processing for their wizard.
performFinish
in interface IWizard
performFinish
in class Wizard
public final RefactoringStatus performPreviewChange(Change change, Refactoring refactoring)
Note: This API must not be called from outside the refactoring framework.
change
- the change displayed in the previewrefactoring
- the associated refactoring
protected RefactoringStatus refactoringPerformed(Refactoring refactoring, IProgressMonitor monitor)
RefactoringStatus.OK
. This method
may be called from non-UI threads.
Subclasses may reimplement this method to perform any special processing.
Returning a status of severity RefactoringStatus.FATAL
will
terminate the execution of the refactorings.
refactoring
- the refactoring which has been performedmonitor
- the progress monitor to use
protected boolean selectPreviewChange(Change change)
true
.
Subclasses may reimplement this method to perform any special filtering of preview changes.
change
- the change to select
true
if the change passes the filter,
false
otherwiseprotected boolean selectStatusEntry(RefactoringStatusEntry entry)
true
.
Subclasses may reimplement this method to perform any special filtering of status entries on error pages.
entry
- the status entry to select
true
if the status entry passes the filter,
false
otherwisepublic final void setConfiguration(RefactoringHistoryControlConfiguration configuration)
This method must be called before opening the wizard in a dialog.
configuration
- the configuration to setpublic final void setInput(RefactoringHistory history)
This method must be called before opening the wizard in a dialog.
history
- the refactoring history
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.