public class PerformRefactoringOperation extends Object implements IWorkspaceRunnable
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.
IWorkspace
Constructor and Description |
---|
PerformRefactoringOperation(RefactoringContext refactoringContext,
int style)
Create a new perform refactoring operation.
|
PerformRefactoringOperation(Refactoring refactoring,
int style)
Create a new perform refactoring operation.
|
Modifier and Type | Method and Description |
---|---|
RefactoringStatus |
getConditionStatus()
Return the refactoring status of the condition checking.
|
Change |
getUndoChange()
The undo object or
null if no undo exists. |
RefactoringStatus |
getValidationStatus()
Returns the refactoring status of the change's validation checking
or
null if a change couldn't be created or the operation
hasn't been performed yet. |
void |
run(IProgressMonitor monitor)
Runs the operation reporting progress to and accepting
cancellation requests from the given progress monitor.
|
public PerformRefactoringOperation(Refactoring refactoring, int style)
RefactoringStatus.FATAL
.refactoring
- the refactoring to performstyle
- the condition checking style as defined by
CheckConditionsOperation
PerformRefactoringOperation(RefactoringContext, int)
public PerformRefactoringOperation(RefactoringContext refactoringContext, int style)
RefactoringStatus.FATAL
.
The caller must ensure that the operation is run exactly once. The implementation
of run(IProgressMonitor)
will call RefactoringContext.dispose()
.
refactoringContext
- the refactoring context to performstyle
- the condition checking style as defined by
CheckConditionsOperation
public RefactoringStatus getConditionStatus()
null
if the operation hasn't been performed yetpublic RefactoringStatus getValidationStatus()
null
if a change couldn't be created or the operation
hasn't been performed yet.public Change getUndoChange()
null
if no undo exists. The undo
object is initialize via the call Change.initializeValidationData(IProgressMonitor)
null
public void run(IProgressMonitor monitor) throws CoreException
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
.
run
in interface IWorkspaceRunnable
monitor
- a progress monitor, or null
if progress
reporting and cancellation are not desiredCoreException
- if this operation fails.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.