Example usage for org.eclipse.jdt.core.dom ContinueStatement getLabel

List of usage examples for org.eclipse.jdt.core.dom ContinueStatement getLabel

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom ContinueStatement getLabel.

Prototype

public SimpleName getLabel() 

Source Link

Document

Returns the label of this continue statement, or null if there is none.

Usage

From source file:at.bestsolution.fxide.jdt.corext.dom.ASTFlattener.java

License:Open Source License

@Override
public boolean visit(ContinueStatement node) {
    this.fBuffer.append("continue");//$NON-NLS-1$
    if (node.getLabel() != null) {
        this.fBuffer.append(" ");//$NON-NLS-1$
        node.getLabel().accept(this);
    }//from www. j  av a 2  s.  c o m
    this.fBuffer.append(";");//$NON-NLS-1$
    return false;
}

From source file:boa.datagen.util.Java7Visitor.java

License:Apache License

@Override
public boolean visit(ContinueStatement 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.CONTINUE);
    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  ww  . j  a  va2 s .c  om*/
    }
    list.add(b.build());
    return false;
}

From source file:chibi.gumtreediff.gen.jdt.cd.CdJdtVisitor.java

License:Open Source License

@Override
public boolean visit(ContinueStatement 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(ContinueStatement node) {
    printIndent();/*from   w  w  w .jav  a 2  s . c  o  m*/
    this.buffer.append("continue");//$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(ContinueStatement node) {
    if (node.getLabel() != null) {
        // Objective-C doesn't have a labeled continue, so use a goto.
        buffer.append("goto ");
        node.getLabel().accept(this);
    } else {//w w w  . ja  va2 s  . c  o  m
        buffer.append("continue");
    }
    buffer.append(";\n");
    return false;
}

From source file:com.google.devtools.j2cpp.types.BindingMapBuilder.java

License:Open Source License

@Override
public boolean visit(ContinueStatement node) {
    SimpleName label = node.getLabel();
    if (label != null) {
        put(label, createLabelBinding(label));
    }//from   ww w .  j ava  2  s. c o  m
    return false;
}

From source file:com.google.devtools.j2objc.ast.DebugASTPrinter.java

License:Apache License

@Override
public boolean visit(ContinueStatement node) {
    sb.printIndent();//from   ww  w  . j  a  v a2s  .co m
    sb.print("continue");
    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 ContinueStatement}s. */
@Override/*from  w w w  .  j  ava  2s  . co  m*/
public boolean visit(ContinueStatement node) {
    sync(node);
    builder.open(plusFour);
    token("continue");
    if (node.getLabel() != null) {
        builder.breakOp(" ");
        visit(node.getLabel());
    }
    token(";");
    builder.close();
    return false;
}

From source file:com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator.java

License:Open Source License

private CAstNode visit(ContinueStatement n, WalkContext context) {
    String label = n.getLabel() == null ? null : n.getLabel().getIdentifier();
    ASTNode target = context.getContinueFor(label);
    assert target != null;
    CAstNode result = makeNode(context, fFactory, n, CAstNode.GOTO);
    context.cfg().map(n, result);/*from  w ww  .j av  a 2 s. c  o  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(ContinueStatement node) {
    EclipseCFGNode continueStmnt = nodeMap.get(node);
    String label = (node.getLabel() != null) ? node.getLabel().getIdentifier() : null;

    EclipseCFGNode continuePoint = blockStack.getContinuePoint(label);
    continueStmnt.setName("continue");
    hookFinally(continueStmnt, null, continuePoint);
    continueStmnt.setEnd(null);//from w ww  . ja  va  2 s  . com
}