if (enclosingNode.getNodeType() == ASTNode.METHOD_DECLARATION) { List thrownExceptions= ((MethodDeclaration)enclosingNode).thrownExceptions(); for (Iterator thrown= thrownExceptions.iterator(); thrown.hasNext();) { ITypeBinding thrownException= ((Name)thrown.next()).resolveTypeBinding(); if (thrownException != null) { for (Iterator excep= exceptions.iterator(); excep.hasNext();) { ITypeBinding exception= (ITypeBinding) excep.next(); if (exception.isAssignmentCompatible(thrownException)) excep.remove(); } } } }
	public static ITypeBinding[] perform(BodyDeclaration enclosingNode, Selection selection) {		ExceptionAnalyzer analyzer= new ExceptionAnalyzer(selection);		enclosingNode.accept(analyzer);		List exceptions= analyzer.getCurrentExceptions();		Collections.sort(exceptions, new ExceptionComparator());		return (ITypeBinding[]) exceptions.toArray(new ITypeBinding[exceptions.size()]);	}