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/ParticipantExtensionPoint.java
public String getName() {
		return fName;
	}
	public RefactoringParticipant[] getParticipants(RefactoringStatus status, RefactoringProcessor processor, Object element, RefactoringArguments arguments, IParticipantDescriptorFilter filter, String[] affectedNatures, SharableParticipants shared) {
		if (fParticipants == null)
			init();
		
		EvaluationContext evalContext= createEvaluationContext(processor, element, affectedNatures);
		List result= new ArrayList();
		for (Iterator iter= fParticipants.iterator(); iter.hasNext();) {
			ParticipantDescriptor descriptor= (ParticipantDescriptor)iter.next();
			if (!descriptor.isEnabled()) {
				iter.remove();
			} else {
				try {
					RefactoringStatus filterStatus= new RefactoringStatus();
					if (descriptor.matches(evalContext, filter, filterStatus)) {
						RefactoringParticipant participant= shared.get(descriptor);
						if (participant != null) {
							((ISharableParticipant)participant).addElement(element, arguments);
						} else {
							participant= descriptor.createParticipant();
							if (fParticipantClass.isInstance(participant)) {
								if (participant.initialize(processor, element, arguments)) {
									participant.setDescriptor(descriptor);
									result.add(participant);
									if (participant instanceof ISharableParticipant)
										shared.put(descriptor, participant);
								}