Bug 116223 [refactoring] ProcessorBasedRefactoring does not handle exceptions thrown by participants
I20051108-1011 ProcessorBasedRefactoring protects itself against participants that throw an exception in createChange(..). However, it does not catch execptions thrown in initialize(..) or in checkConditions(..). We had a case where initialize(..) threw a ClassCastException, which generated a wrong error message (participant does not extend required type). I think we should protect all call backs and disable participants that throw a RuntimeException.
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/participants/ProcessorBasedRefactoring.java
pm.beginTask("", 9); 
		pm.setTaskName(RefactoringCoreMessages.ProcessorBasedRefactoring_final_conditions); 
		
		result.merge(getProcessor().checkFinalConditions(new SubProgressMonitor(pm, 5), context));
		if (result.hasFatalError()) {
			pm.done();
			return result;
		}
		if (pm.isCanceled())
			throw new OperationCanceledException();
		
		fParticipants= getProcessor().loadParticipants(result, fSharedParticipants);
		if (fParticipants == null) 
			fParticipants= EMPTY_PARTICIPANTS;
		if (result.hasFatalError()) {
			pm.done();
			return result;
		}
		IProgressMonitor sm= new SubProgressMonitor(pm, 2);
		sm.beginTask("", fParticipants.length); 
		for (int i= 0; i < fParticipants.length && !result.hasFatalError(); i++) {
			final PerformanceStats stats= PerformanceStats.getStats(PERF_CHECK_CONDITIONS, getName() + ", " + fParticipants[i].getName()); 
			stats.startRun();
			result.merge(fParticipants[i].checkConditions(new SubProgressMonitor(sm, 1), context));
			stats.endRun();
			if (sm.isCanceled())
				throw new OperationCanceledException();
		}
		sm.done();