Bug 47010 Make refactorings more responsive to cancel [refactoring]
I20031119 Most of our current refactorings only do a sporadic check of IProgressMonitor.isCanceled() resulting in a bad canceling behavior. We should make a path over our existing refactoring and queck the cancel state at least after each compilation unit we have processes in checkInput and createChange. The code pattern to add should look like this: pm.worked(...) if (pm.isCanceled()) { // clean-up state if necessary throw new OperationCancelException(); }
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Refactoring.java
*/
	public abstract Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException;
	/**
	 * Returns the scheduling rule associated with this refactoring element.
	 * This scheduling rule should be used whenever one of the refactoring's
	 * method is executed inside a {@linkplain org.eclipse.core.resources.IWorkspaceRunnable
	 * work space runnable} or when the change created by this refactoring is
	 * performed.
	 * 
	 * @return the scheduling rule associated with this refactoring
	 */
	
	
	/**
	 * {@inheritDoc}
	 */
	public Object getAdapter(Class adapter) {
		if (adapter.isInstance(this))
			return this;
		return super.getAdapter(adapter);
	}
	
	/* (non-Javadoc)
	 * for debugging only
	 */
	public String toString() {
		return getName();
	}
}