Class PerformRefactoringOperation

java.lang.Object
org.eclipse.ltk.core.refactoring.PerformRefactoringOperation
All Implemented Interfaces:
IWorkspaceRunnable, ICoreRunnable

public class PerformRefactoringOperation extends Object implements IWorkspaceRunnable
Operation that, when run, executes a refactoring. This includes condition checking, change creation, change execution and remembering of the undo change on the refactoring's undo stack.

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:
Restriction:
This class is not intended to be subclassed by clients.
  • Constructor Details

  • Method Details

    • getConditionStatus

      public RefactoringStatus getConditionStatus()
      Return the refactoring status of the condition checking.
      Returns:
      the refactoring status of the condition checking or null if the operation hasn't been performed yet
    • getValidationStatus

      public 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.
      Returns:
      the refactoring status of the change's validation checking
    • getUndoChange

      public Change getUndoChange()
      The undo object or null if no undo exists. The undo object is initialize via the call Change.initializeValidationData(IProgressMonitor)
      Returns:
      the undo object or null
    • run

      public void run(IProgressMonitor monitor) throws CoreException
      Description copied from interface: ICoreRunnable
      Executes this runnable.

      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.

      Specified by:
      run in interface ICoreRunnable
      Specified by:
      run in interface IWorkspaceRunnable
      Parameters:
      monitor - 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.
      Throws:
      CoreException - if this operation fails