public void checkNotLoneTry(Try node) { if (node.rawCatches().size() == 0 && node.rawFinally() == null) { node.addMessage(error(TRY_LONE_TRY, "try statement with no catches and no finally")); } }
public void checkNotLoneTry(Try node) { if (node.rawCatches().size() == 0 && node.rawFinally() == null) { node.addMessage(error(TRY_LONE_TRY, "try statement with no catches and no finally")); } }
public void checkNotLoneTry(Try node) { if (node.rawCatches().size() == 0 && node.rawFinally() == null) { node.addMessage(error(TRY_LONE_TRY, "try statement with no catches and no finally")); } }
public Node createTryStatement(Node body, List<Node> catches, Node finallyBody) { Try result = new Try().rawBody(body).rawFinally(finallyBody); if (catches != null) for (Node c : catches) if (c != null) result.rawCatches().addToEnd(c); return posify(result); }
public Node createTryStatement(Node body, List<Node> catches, Node finallyBody) { Try result = new Try().rawBody(body).rawFinally(finallyBody); if (catches != null) for (Node c : catches) if (c != null) result.rawCatches().addToEnd(c); return posify(result); }
public Node createTryStatement(Node body, List<Node> catches, Node finallyBody) { Try result = new Try().rawBody(body).rawFinally(finallyBody); if (catches != null) for (Node c : catches) if (c != null) result.rawCatches().addToEnd(c); return posify(result); }
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }
@Override public boolean visitTry(Try node) { formatter.buildBlock(node); formatter.keyword("try"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("try"); visit(node.rawBody()); formatter.endSuppressBlock(); visitAll(node.rawCatches(), " ", " ", ""); if (node.rawFinally() != null) { formatter.space(); formatter.keyword("finally"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("finally"); visit(node.rawFinally()); formatter.endSuppressBlock(); } formatter.closeBlock(); return true; }
@Override public boolean visitTry(Try node) { formatter.buildBlock(node); formatter.keyword("try"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("try"); visit(node.rawBody()); formatter.endSuppressBlock(); visitAll(node.rawCatches(), " ", " ", ""); if (node.rawFinally() != null) { formatter.space(); formatter.keyword("finally"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("finally"); visit(node.rawFinally()); formatter.endSuppressBlock(); } formatter.closeBlock(); return true; }
@Override public boolean visitTry(Try node) { formatter.buildBlock(node); formatter.keyword("try"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("try"); visit(node.rawBody()); formatter.endSuppressBlock(); visitAll(node.rawCatches(), " ", " ", ""); if (node.rawFinally() != null) { formatter.space(); formatter.keyword("finally"); formatter.space(); formatter.startSuppressBlock(); formatter.nameNextElement("finally"); visit(node.rawFinally()); formatter.endSuppressBlock(); } formatter.closeBlock(); return true; }