Example usage for org.eclipse.jdt.core.dom MethodRefParameter accept

List of usage examples for org.eclipse.jdt.core.dom MethodRefParameter accept

Introduction

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

Prototype

public final void accept(ASTVisitor visitor) 

Source Link

Document

Accepts the given visitor on a visit of the current node.

Usage

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

License:Open Source License

@Override
public boolean visit(MethodRef node) {
    if (node.getQualifier() != null) {
        node.getQualifier().accept(this);
    }// ww  w  .ja va2 s . c o m
    this.fBuffer.append("#");//$NON-NLS-1$
    node.getName().accept(this);
    this.fBuffer.append("(");//$NON-NLS-1$
    for (Iterator<MethodRefParameter> it = node.parameters().iterator(); it.hasNext();) {
        MethodRefParameter e = it.next();
        e.accept(this);
        if (it.hasNext()) {
            this.fBuffer.append(",");//$NON-NLS-1$
        }
    }
    this.fBuffer.append(")");//$NON-NLS-1$
    return false;
}

From source file:coloredide.utils.CopiedNaiveASTFlattener.java

License:Open Source License

public boolean visit(MethodRef node) {
    if (node.getQualifier() != null) {
        node.getQualifier().accept(this);
    }//from  w  w  w. j a  v a2s.co m
    this.buffer.append("#");//$NON-NLS-1$
    node.getName().accept(this);
    this.buffer.append("(");//$NON-NLS-1$
    for (Iterator it = node.parameters().iterator(); it.hasNext();) {
        MethodRefParameter e = (MethodRefParameter) it.next();
        e.accept(this);
        if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
        }
    }
    this.buffer.append(")");//$NON-NLS-1$
    return false;
}

From source file:ptolemy.backtrack.eclipse.ast.ASTFormatter.java

License:Open Source License

/** Visit an ast node, and return whether its children should be further
 *  visited./*from   w w  w  .j  a  v  a2s  .co  m*/
 *
 *  @param node The AST node.
 *  @return Whether its children should be further visited.
 */
public boolean visit(MethodRef node) {
    if (node.getQualifier() != null) {
        node.getQualifier().accept(this);
    }

    _output("#");
    node.getName().accept(this);
    _output("(");

    for (Iterator it = node.parameters().iterator(); it.hasNext();) {
        MethodRefParameter e = (MethodRefParameter) it.next();
        e.accept(this);

        if (it.hasNext()) {
            _output(", ");
        }
    }

    _output(")");
    return false;
}