Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
if (selectedNode.getParent() instanceof ReturnStatement) {
				ReturnStatement returnStatement= (ReturnStatement) selectedNode.getParent();
				Expression expr= returnStatement.getExpression();
				if (expr != null) {
					ITypeBinding binding= expr.resolveTypeBinding();
					if (binding != null) {
						if ("null".equals(binding.getName())) { 
							binding= selectedNode.getAST().resolveWellKnownType("java.lang.Object"); 
						}
						BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(returnStatement);
						if (decl instanceof MethodDeclaration) {
							ASTNode returnType= ((MethodDeclaration) decl).getReturnType();
							String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.voidmethodreturns.description") + binding.getName(); 
							ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, returnType.getStartPosition(), returnType.getLength(), binding.getName(), 0); 					
							proposals.add(proposal);
						}
					}
				}
			}
		}
	}
	public static void addMissingReturnTypeProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
		ICompilationUnit cu= problemPos.getCompilationUnit();
		
		CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
		ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
		if (selectedNode != null) {
			BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);
			if (decl instanceof MethodDeclaration) {
				final ITypeBinding[] res= new ITypeBinding[1];