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)
Executes this runnable.
|
public PerformRefactoringOperation(Refactoring refactoring, int style)
RefactoringStatus.FATAL.refactoring - the refactoring to performstyle - the condition checking style as defined by
CheckConditionsOperationPerformRefactoringOperation(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
CheckConditionsOperationpublic 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)nullpublic void run(IProgressMonitor monitor) throws CoreException
ICoreRunnable
The provided monitor can be used to report progress and respond to
cancellation. If the progress monitor has been canceled, the runnable
should finish its execution at the earliest convenience and throw
an OperationCanceledException. A CoreException with a status
of severity IStatus.CANCEL has the same effect as
an OperationCanceledException.
run in interface IWorkspaceRunnablerun in interface ICoreRunnablemonitor - a progress monitor, or null if progress reporting and
cancellation are not desired. The monitor is only valid for the duration
of the invocation of this method. Callers may call IProgressMonitor.done()
after this method returns or throws an exception, but this is not strictly
required.CoreException - if this operation fails
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.