List of usage examples for org.eclipse.jdt.core.dom BreakStatement getLabel
public SimpleName getLabel()
null if there is none. From source file:at.bestsolution.fxide.jdt.corext.dom.ASTFlattener.java
License:Open Source License
@Override public boolean visit(BreakStatement node) { this.fBuffer.append("break");//$NON-NLS-1$ if (node.getLabel() != null) { this.fBuffer.append(" ");//$NON-NLS-1$ node.getLabel().accept(this); }/*from w w w. jav a 2 s. com*/ this.fBuffer.append(";");//$NON-NLS-1$ return false; }
From source file:boa.datagen.util.Java7Visitor.java
License:Apache License
@Override public boolean visit(BreakStatement node) { boa.types.Ast.Statement.Builder b = boa.types.Ast.Statement.newBuilder(); // b.setPosition(pos.build()); List<boa.types.Ast.Statement> list = statements.peek(); b.setKind(boa.types.Ast.Statement.StatementKind.BREAK); if (node.getLabel() != null) { boa.types.Ast.Expression.Builder eb = boa.types.Ast.Expression.newBuilder(); // eb.setPosition(pos.build()); // FIXME eb.setLiteral(node.getLabel().getFullyQualifiedName()); eb.setKind(boa.types.Ast.Expression.ExpressionKind.LITERAL); b.setExpression(eb.build());//from w w w.jav a 2 s.c o m } list.add(b.build()); return false; }
From source file:chibi.gumtreediff.gen.jdt.cd.CdJdtVisitor.java
License:Open Source License
@Override public boolean visit(BreakStatement node) { pushNode(node, node.getLabel() != null ? node.getLabel().toString() : ""); return false; }
From source file:coloredide.utils.CopiedNaiveASTFlattener.java
License:Open Source License
public boolean visit(BreakStatement node) { printIndent();/* w w w .j a v a 2 s. c o m*/ this.buffer.append("break");//$NON-NLS-1$ if (node.getLabel() != null) { this.buffer.append(" ");//$NON-NLS-1$ node.getLabel().accept(this); } this.buffer.append(";\n");//$NON-NLS-1$ return false; }
From source file:com.google.devtools.j2cpp.gen.CppStatementGenerator.java
License:Open Source License
@Override public boolean visit(BreakStatement node) { if (node.getLabel() != null) { // Objective-C doesn't have a labeled break, so use a goto. buffer.append("goto "); node.getLabel().accept(this); } else {// w w w . j av a 2 s.co m buffer.append("break"); } buffer.append(";\n"); return false; }
From source file:com.google.devtools.j2cpp.types.BindingMapBuilder.java
License:Open Source License
@Override public boolean visit(BreakStatement node) { SimpleName label = node.getLabel(); if (label != null) { put(label, createLabelBinding(label)); }/*from w w w . ja va2s .c o m*/ return false; }
From source file:com.google.devtools.j2objc.ast.DebugASTPrinter.java
License:Apache License
@Override public boolean visit(BreakStatement node) { sb.printIndent();/*from w ww. ja v a 2 s.c o m*/ sb.print("break"); if (node.getLabel() != null) { sb.print(' '); node.getLabel().accept(this); } sb.println(';'); return false; }
From source file:com.google.googlejavaformat.java.JavaInputAstVisitor.java
License:Apache License
/** Visitor method for {@link BreakStatement}s. */ @Override// w ww.j ava 2 s. c o m public boolean visit(BreakStatement node) { sync(node); builder.open(plusFour); token("break"); if (node.getLabel() != null) { builder.breakOp(" "); visit(node.getLabel()); } builder.close(); token(";"); return false; }
From source file:com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator.java
License:Open Source License
private CAstNode visit(BreakStatement n, WalkContext context) { String label = n.getLabel() == null ? null : n.getLabel().getIdentifier(); ASTNode target = context.getBreakFor(label); assert target != null; CAstNode result = makeNode(context, fFactory, n, CAstNode.GOTO); context.cfg().map(n, result);/*from w ww . ja v a2 s . co m*/ context.cfg().add(n, target, null); return result; }
From source file:edu.cmu.cs.crystal.cfg.eclipse.EclipseCFG.java
License:Open Source License
@Override public void endVisit(BreakStatement node) { EclipseCFGNode breakStmnt = nodeMap.get(node); String label = (node.getLabel() != null) ? node.getLabel().getIdentifier() : null; EclipseCFGNode breakPoint = blockStack.getBreakPoint(label); breakStmnt.setName("break"); hookFinally(breakStmnt, null, breakPoint); breakStmnt.setEnd(null);// w ww. j a v a 2 s .co m }