public class RefactoringWizardOpenOperation extends Object
Note: this class is not intended to be extended by clients.
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_CONDITION_CHECKING_FAILED
Constant (value 1025) indicating that the precondition check failed
when opening a refactoring wizard dialog.
|
Constructor and Description |
---|
RefactoringWizardOpenOperation(RefactoringWizard wizard)
Creates a new refactoring wizard starter for the given wizard.
|
Modifier and Type | Method and Description |
---|---|
RefactoringStatus |
getInitialConditionCheckingStatus()
Returns the outcome of the initial condition checking.
|
int |
run(Shell parent,
String dialogTitle)
Opens the refactoring dialog for the refactoring wizard passed to the constructor.
|
int |
run(Shell parent,
String dialogTitle,
IRunnableContext context)
Opens the refactoring dialog for the refactoring wizard passed to the constructor.
|
public static final int INITIAL_CONDITION_CHECKING_FAILED
run(Shell, String)
,
Constant Field Valuespublic RefactoringWizardOpenOperation(RefactoringWizard wizard)
If the wizard was created via RefactoringWizard.RefactoringWizard(RefactoringContext, int)
,
then this operation will also dispose
of the context
at the end of all run
methods.
wizard
- the wizard to open a dialog forpublic RefactoringStatus getInitialConditionCheckingStatus()
null
if the condition checking hasn't been performed yetpublic int run(Shell parent, String dialogTitle) throws InterruptedException
RefactoringStatus.FATAL
then
a message dialog is opened containing the corresponding status message. No wizard
dialog is opened in this situation. If the condition checking passes then the
refactoring dialog is opened.
The methods ensures that the workspace lock is held while the condition checking, change creation and change execution is performed. Clients can't make any assumption about the thread in which these steps are executed. However the framework ensures that the workspace lock is transfered to the thread in which the execution of the steps takes place.
parent
- the parent shell for the dialog or null
if the dialog
is a top level dialogdialogTitle
- the dialog title of the message box presenting the failed
condition check (if any)INITIAL_CONDITION_CHECKING_FAILED
if the initial condition checking
failed and no wizard dialog was presented. Otherwise either IDialogConstants.OK_ID
or IDialogConstants.CANCEL_ID
is returned depending on whether the user
has pressed the OK or cancel button on the wizard dialog.InterruptedException
- if the initial condition checking got canceled by
the user.public int run(Shell parent, String dialogTitle, IRunnableContext context) throws InterruptedException
RefactoringStatus.FATAL
then
a message dialog is opened containing the corresponding status message. No wizard
dialog is opened in this situation. If the condition checking passes then the
refactoring dialog is opened.
The methods ensures that the workspace lock is held while the condition checking, change creation and change execution is performed. Clients can't make any assumption about the thread in which these steps are executed. However the framework ensures that the workspace lock is transfered to the thread in which the execution of the steps takes place.
parent
- the parent shell for the dialog or null
if the dialog
is a top level dialogdialogTitle
- the dialog title of the message box presenting the failed
condition check (if any)context
- the runnable context to use for conditions checking before the
refactoring wizard dialog is visible. If null
, the workbench window's
progress service is used.INITIAL_CONDITION_CHECKING_FAILED
if the initial condition checking
failed and no wizard dialog was presented. Otherwise either IDialogConstants.OK_ID
or IDialogConstants.CANCEL_ID
is returned depending on whether the user
has pressed the OK or cancel button on the wizard dialog.InterruptedException
- if the initial condition checking got canceled by
the user.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.