Bug 31554 QuickFix Add catch clause to surrounding try in catch clause incorrect [code manipulation] [refactoring]
With the following code in the editor: try{ someMethod(); //throws SomeException }catch(SomeException e){ someOtherMethod(); //throws SomeException } You will get a QuickFix that suggests to add a catch clause to the surrounding try. There is no surrounding try. It will add another catch(SomeException e) to the try clause above! This catch clause is unreachable (which the editor notices). The exception is still uncaught (which the editor doesn't notice). Build: 2.1-M5
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 6, image);
			proposal.ensureNoModifications();
			proposals.add(proposal);			
		}
	}
	public static void addConstructorFromSuperclassProposal(ICorrectionContext context, List proposals) {
		ASTNode selectedNode= context.getCoveringNode();
		if (!(selectedNode instanceof Name && selectedNode.getParent() instanceof TypeDeclaration)) {
			return;
		}
		TypeDeclaration typeDeclaration= (TypeDeclaration) selectedNode.getParent();
		ITypeBinding binding= typeDeclaration.resolveBinding();
		if (binding == null || binding.getSuperclass() == null) {
			return;
		}
		ICompilationUnit cu= context.getCompilationUnit();
		IMethodBinding[] methods= binding.getSuperclass().getDeclaredMethods();
		for (int i= 0; i < methods.length; i++) {
			IMethodBinding curr= methods[i];
			if (curr.isConstructor() && !Modifier.isPrivate(curr.getModifiers())) {
				proposals.add(new ConstructorFromSuperclassProposal(cu, typeDeclaration, curr, 2));
			}
		}
	}
	public static void addUnusedMemberProposal(ICorrectionContext context, List proposals) throws CoreException {
		ASTNode selectedNode= context.getCoveringNode();
		if (selectedNode == null) {
			return;
		}
		BodyDeclaration declaration= ASTResolving.findParentBodyDeclaration(selectedNode);