Bug 33543 Add catch clause to surrounding try doesn't honor code templates [quick fix]
RC1 Test Case import java.io.IOException; public class Test { public void foo() { try { ex1(); ex2(); } catch (IOException e) { e.printStackTrace(); } } public void ex1() throws IOException { } public void ex2 () throws InterruptedException { } } Observe: the generated catch block is empty.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
}
			for (int i= 0; i < exceptions.size(); i++) {
				Name elem= (Name) exceptions.get(i);
				if (canRemove(elem.resolveTypeBinding(), uncaughtExceptions)) {
					rewrite.markAsRemoved(elem);
				}
			}
			proposal.ensureNoModifications();
			proposals.add(proposal);
		}
	}
	
	private static boolean canRemove(ITypeBinding curr, ITypeBinding[] addedExceptions) {
		while (curr != null) {
			for (int i= 0; i < addedExceptions.length; i++) {
				if (curr == addedExceptions[i]) {
					return true;
				}
			}
			curr= curr.getSuperclass();
		}
		return false;
	}
	
	public static void addUnreachableCatchProposals(ICorrectionContext context, List proposals) throws CoreException {
		ICompilationUnit cu= context.getCompilationUnit();
		ASTNode selectedNode= context.getCoveringNode();
		if (selectedNode == null) {
			return;
		}