Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ltk.core.refactoring
Class PerformRefactoringHistoryOperation

java.lang.Object
  extended by 
org.eclipse.ltk.core.refactoring.PerformRefactoringHistoryOperation
All Implemented Interfaces:
IWorkspaceRunnable

public class PerformRefactoringHistoryOperation
extends Object
implements IWorkspaceRunnable

Operation that, when run, executes a series of refactoring sequentially. Refactorings are executed using PerformRefactoringOperation.

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 instantiated or extended outside of the refactoring framework.

Since:
3.2
See Also:
IWorkspace, PerformRefactoringOperation, RefactoringHistory, RefactoringHistoryService
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Constructor Summary
PerformRefactoringHistoryOperation ( RefactoringHistory history)
          Creates a new perform refactoring history operation.
 
Method Summary
protected   RefactoringStatus aboutToPerformRefactoring ( Refactoring refactoring, RefactoringDescriptor descriptor, IProgressMonitor monitor)
          Hook method which is called when the specified refactoring is going to be executed.
protected   Refactoring createRefactoring ( RefactoringDescriptor descriptor, RefactoringStatus status)
          Deprecated. since 3.4. Override createRefactoring(RefactoringDescriptor, RefactoringStatus, IProgressMonitor) instead
protected   Refactoring createRefactoring ( RefactoringDescriptor descriptor, RefactoringStatus status, IProgressMonitor monitor)
          Method which is called to create a refactoring instance from a refactoring descriptor.
  RefactoringStatus getExecutionStatus ()
          Returns the execution status.
protected  void refactoringPerformed ( Refactoring refactoring, IProgressMonitor monitor)
          Hook method which is called when the specified refactoring has been performed.
 void run ( IProgressMonitor monitor)
          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
 

Constructor Detail

PerformRefactoringHistoryOperation

public PerformRefactoringHistoryOperation(
RefactoringHistory history)
Creates a new perform refactoring history operation.

Parameters:
history - the refactoring history
Method Detail

aboutToPerformRefactoring

protected 
RefactoringStatus aboutToPerformRefactoring(
Refactoring refactoring,
                                                      
RefactoringDescriptor descriptor,
                                                      
IProgressMonitor monitor)
Hook method which is called when the specified refactoring is going to be executed.

Parameters:
refactoring - the refactoring about to be executed
descriptor - the refactoring descriptor
monitor - the progress monitor to use
Returns:
a status describing the outcome of the initialization

createRefactoring

protected 
Refactoring createRefactoring(
RefactoringDescriptor descriptor,
                                        
RefactoringStatus status)
                                 throws 
CoreException
Deprecated. since 3.4. Override createRefactoring(RefactoringDescriptor, RefactoringStatus, IProgressMonitor) instead

Method which is called to create a refactoring instance from a refactoring descriptor. The refactoring must be in an initialized state at the return of the method call. The default implementation delegates the task to the refactoring descriptor.

Parameters:
descriptor - the refactoring descriptor
status - a refactoring status to describe the outcome of the initialization
Returns:
the refactoring, or null if this refactoring descriptor represents the unknown refactoring, or if no refactoring contribution is available for this refactoring descriptor
Throws:
CoreException - if an error occurs while creating the refactoring instance

createRefactoring

protected 
Refactoring createRefactoring(
RefactoringDescriptor descriptor,
                                        
RefactoringStatus status,
                                        
IProgressMonitor monitor)
                                 throws 
CoreException
Method which is called to create a refactoring instance from a refactoring descriptor. The refactoring must be in an initialized state at the return of the method call. The default implementation delegates the task to the refactoring descriptor.

Parameters:
descriptor - the refactoring descriptor
status - a refactoring status to describe the outcome of the initialization
monitor - the progress monitor to use
Returns:
the refactoring, or null if this refactoring descriptor represents the unknown refactoring, or if no refactoring contribution is available for this refactoring descriptor
Throws:
CoreException - if an error occurs while creating the refactoring instance
Since:
3.4

getExecutionStatus

public final 
RefactoringStatus getExecutionStatus()
Returns the execution status. Guaranteed not to be null.

Returns:
the status of the session

refactoringPerformed

protected void refactoringPerformed(
Refactoring refactoring,
                                    
IProgressMonitor monitor)
Hook method which is called when the specified refactoring has been performed.

Parameters:
refactoring - the refactoring which has been performed
monitor - the progress monitor to use

run

public void run(
IProgressMonitor monitor)
         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:
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
CoreException - if this operation fails.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire