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
Answertopia.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 PerformRefactoringOperation


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

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

Constructor Summary
PerformRefactoringOperation ( Refactoring refactoring, int style)
          Create a new perform refactoring operation.
 
Method Summary
  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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformRefactoringOperation

public PerformRefactoringOperation(
Refactoring refactoring,
                                   int style)
Create a new perform refactoring operation. The operation will not perform the refactoring if the refactoring's condition checking returns an error of severity RefactoringStatus.FATAL.

Parameters:
refactoring - the refactoring to perform
style - the condition checking style as defined by CheckConditionsOperation
Method Detail

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