Class 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.

See Also:
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.
      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.
      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)
      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
      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.
      CoreException - if this operation fails