Bug 82536 Surround with doesn't use OLD ast rewrite anymore
therefore the following // SurroundWithTryCatchRefactoring still uses modifying rewrite - pass in a copy ASTParser parser= ASTParser.newParser(ASTProvider.AST_LEVEL); parser.setSource(cu); parser.setResolveBindings(true); parser.setFocalPosition(selectedNode.getStartPosition()); CompilationUnit newRoot= (CompilationUnit) parser.createAST(null); could be removed form LocalCorrectionsSubProcessor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
rewrite.set(typeDecl, TypeDeclaration.INTERFACE_PROPERTY, Boolean.TRUE, null);
			
			String typeName= typeDecl.getName().getIdentifier();
			String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.classtointerface.description", typeName); 
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
			ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 3, image); 
			proposals.add(proposal);
		}
	}
	public static void getUnreachableCodeProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
		CompilationUnit root= context.getASTRoot();
		ASTNode selectedNode= problem.getCoveringNode(root);
		if (selectedNode == null) {
			return;
		}
		if (selectedNode instanceof ExpressionStatement) {
			selectedNode= selectedNode.getParent();
		}
		if (selectedNode instanceof Statement) {
			ASTRewrite rewrite= ASTRewrite.create(selectedNode.getAST());
			rewrite.remove(selectedNode, null);
			String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.removeunreachablecode.description"); 
			Image image= JavaPlugin.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE);
			ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 3, image); 
			proposals.add(proposal);
		}
	}
	
}