org.eclipse.ltk.core.refactoring
Class CheckConditionsOperation
java.lang.Object
org.eclipse.ltk.core.refactoring.CheckConditionsOperation
-
All Implemented Interfaces:
-
IWorkspaceRunnable
-
public class CheckConditionsOperation
- extends
Object
- implements
IWorkspaceRunnable
Operation that, when run, checks the preconditions of the
Refactoring
passed on creation.
The operation should be executed via the run method offered by
IWorkspace
to achieve proper delta batching.
Note: this class is not intended to be extended by clients.
-
Since:
- 3.0
-
See Also:
-
Refactoring.checkInitialConditions(IProgressMonitor)
,
Refactoring.checkFinalConditions(IProgressMonitor)
,
Refactoring.checkAllConditions(IProgressMonitor)
-
Restriction:
- This class is not intended to be subclassed by clients.
Field Summary
|
static int
|
ALL_CONDITIONS
Flag indicating that all conditions will be checked |
static int
|
FINAL_CONDITIONS
Flag indicating that only final conditions will be checked |
static int
|
INITIAL_CONDITONS
Flag indicating that only initial conditions will be checked |
static int
|
NONE
Flag indicating that no conditions will be checked |
Method Summary
|
Refactoring
|
getRefactoring
()
Returns the operation's refactoring |
RefactoringStatus
|
getStatus
()
Returns the outcome of the operation or null if an exception
has occurred while performing the operation or if the operation hasn't
been performed yet. |
int
|
getStyle
()
Returns the condition checking style. |
void
|
run
(
IProgressMonitor pm)
Runs the operation reporting progress to and accepting
cancellation requests from the given progress monitor. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
NONE
public static final int NONE
- Flag indicating that no conditions will be checked
-
See Also:
-
Constant Field Values
INITIAL_CONDITONS
public static final int INITIAL_CONDITONS
- Flag indicating that only initial conditions will be checked
-
See Also:
-
Constant Field Values
FINAL_CONDITIONS
public static final int FINAL_CONDITIONS
- Flag indicating that only final conditions will be checked
-
See Also:
-
Constant Field Values
ALL_CONDITIONS
public static final int ALL_CONDITIONS
- Flag indicating that all conditions will be checked
-
See Also:
-
Constant Field Values
CheckConditionsOperation
public CheckConditionsOperation(
Refactoring refactoring,
int style)
- Creates a new
CheckConditionsOperation
.
-
Parameters:
-
refactoring
- the refactoring for which the preconditions are to
be checked. -
style
- style to define which conditions to check. Must be one of
INITIAL_CONDITONS
, FINAL_CONDITIONS
or
ALL_CONDITIONS
run
public void run(
IProgressMonitor pm)
throws
CoreException
- Runs the operation reporting progress to and accepting
cancellation requests from the given progress monitor.
Implementors of this method should check the progress monitor
for cancellation when it is safe and appropriate to do so. The cancellation
request should be propagated to the caller by throwing
OperationCanceledException
.
-
-
Specified by:
-
run
in interface
IWorkspaceRunnable
-
-
Parameters:
-
pm
- a progress monitor, or null
if progress
reporting and cancellation are not desired
-
Throws:
-
CoreException
- if this operation fails.
getStatus
public
RefactoringStatus getStatus()
- Returns the outcome of the operation or
null
if an exception
has occurred while performing the operation or if the operation hasn't
been performed yet.
-
-
-
Returns:
- the
RefactoringStatus
of the condition checking
getRefactoring
public
Refactoring getRefactoring()
- Returns the operation's refactoring
-
-
-
Returns:
- the operation's refactoring
getStyle
public int getStyle()
- Returns the condition checking style.
-
-
-
Returns:
- the condition checking style
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.