Example usage for org.eclipse.jdt.core.dom SynchronizedStatement setBody

List of usage examples for org.eclipse.jdt.core.dom SynchronizedStatement setBody

Introduction

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

Prototype

public void setBody(Block block) 

Source Link

Document

Sets the body of this synchronized statement.

Usage

From source file:java5totext.input.JDTVisitor.java

License:Open Source License

@Override
public void endVisit(org.eclipse.jdt.core.dom.SynchronizedStatement node) {
    SynchronizedStatement element = (SynchronizedStatement) this.binding.get(node);
    this.initializeNode(element, node);

    if (this.binding.get(node.getBody()) != null)
        element.setBody((Block) this.binding.get(node.getBody()));
    if (this.binding.get(node.getExpression()) != null)
        element.setExpression((Expression) this.binding.get(node.getExpression()));
}

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public SynchronizedStatement convert(org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement statement) {
    SynchronizedStatement synchronizedStatement = new SynchronizedStatement(this.ast);
    synchronizedStatement.setSourceRange(statement.sourceStart,
            statement.sourceEnd - statement.sourceStart + 1);
    synchronizedStatement.setBody(convert(statement.block));
    synchronizedStatement.setExpression(convert(statement.expression));
    return synchronizedStatement;
}

From source file:org.eclipse.modisco.java.discoverer.internal.io.java.JDTVisitor.java

License:Open Source License

@Override
public void endVisit(final org.eclipse.jdt.core.dom.SynchronizedStatement node) {
    SynchronizedStatement element = (SynchronizedStatement) this.binding.get(node);
    initializeNode(element, node);/*from w ww .  j a  v  a 2  s .c  o  m*/

    if (this.binding.get(node.getBody()) != null) {
        element.setBody((Block) this.binding.get(node.getBody()));
    }

    if (this.binding.get(node.getExpression()) != null) {
        element.setExpression(JDTVisitorUtils.completeExpression(this.binding.get(node.getExpression()), this));
    }
}

From source file:org.whole.lang.java.util.JDTTransformerVisitor.java

License:Open Source License

@Override
public boolean visit(SynchronizedStatement node) {
    org.whole.lang.java.model.SynchronizedStatement syncStm = lf
            .create(JavaEntityDescriptorEnum.SynchronizedStatement);

    acceptChild(node.getExpression());/*from   w w  w.j  av a  2s  .  c o  m*/
    syncStm.setExpression(exp);

    acceptChild(node.getBody());
    syncStm.setBody(block);

    stm = syncStm;
    return false;
}