Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Expression


        this.buffer.append(">");//$NON-NLS-1$
      }
    }
    this.buffer.append("this(");//$NON-NLS-1$
    for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(");\n");//$NON-NLS-1$
View Full Code Here


    printModifiers(node.modifiers());
    node.getName().accept(this);
    if (!node.arguments().isEmpty()) {
      this.buffer.append("(");//$NON-NLS-1$
      for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
        Expression e = (Expression) it.next();
        e.accept(this);
        if (it.hasNext()) {
          this.buffer.append(",");//$NON-NLS-1$
        }
      }
      this.buffer.append(")");//$NON-NLS-1$
View Full Code Here

   */
  public boolean visit(ForStatement node) {
    printIndent();
    this.buffer.append("for (");//$NON-NLS-1$
    for (Iterator it = node.initializers().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) this.buffer.append(", ");//$NON-NLS-1$
    }
    this.buffer.append("; ");//$NON-NLS-1$
    if (node.getExpression() != null) {
      node.getExpression().accept(this);
    }
    this.buffer.append("; ");//$NON-NLS-1$
    for (Iterator it = node.updaters().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) this.buffer.append(", ");//$NON-NLS-1$
    }
    this.buffer.append(") ");//$NON-NLS-1$
    node.getBody().accept(this);
    return false;
View Full Code Here

    final List extendedOperands = node.extendedOperands();
    if (extendedOperands.size() != 0) {
      this.buffer.append(' ');
      for (Iterator it = extendedOperands.iterator(); it.hasNext(); ) {
        this.buffer.append(node.getOperator().toString()).append(' ');
        Expression e = (Expression) it.next();
        e.accept(this);
      }
    }
    return false;
  }
View Full Code Here

      }
    }
    node.getName().accept(this);
    this.buffer.append("(");//$NON-NLS-1$
    for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(")");//$NON-NLS-1$
View Full Code Here

        this.buffer.append(">");//$NON-NLS-1$
      }
    }
    this.buffer.append("super(");//$NON-NLS-1$
    for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(");\n");//$NON-NLS-1$
View Full Code Here

      }
    }
    node.getName().accept(this);
    this.buffer.append("(");//$NON-NLS-1$
    for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
      Expression e = (Expression) it.next();
      e.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(")");//$NON-NLS-1$
View Full Code Here

 
  public Object parseValue(Object oldValue, List args) {
    if (oldValue != null && !(oldValue instanceof ResourceImage)) {
      Image icon = (Image)oldValue;
      Expression arg = (Expression) args.get(0);
      if (arg instanceof MethodInvocation) {
        MethodInvocation mi = (MethodInvocation) arg;
        args = mi.arguments();
        arg = (Expression) args.get(0);
        if (arg instanceof MethodInvocation) {
View Full Code Here

@SuppressWarnings("unchecked")
public class IconValueParser implements IValueParser {
  public Object parseValue(Object oldValue, List args) {
    if (oldValue != null && !(oldValue instanceof ResourceIcon)) {
      Icon icon = (Icon) oldValue;
      Expression arg = (Expression) args.get(0);
      if (arg instanceof ClassInstanceCreation) {
        ClassInstanceCreation instanceCreation = (ClassInstanceCreation) arg;
        args = instanceCreation.arguments();
        arg = (Expression) args.get(0);
        if (arg instanceof MethodInvocation) {
View Full Code Here

        InfixExpression oddnessCheck = findOddnessCheck(getASTNode(workingUnit, bug.getPrimarySourceLineAnnotation()));
        if (oddnessCheck == null) {
            throw new BugResolutionException("No matching oddness check found at the specified source line.");
        }
        Expression numberExpression = findNumberExpression(oddnessCheck);
        if (numberExpression == null) {
            throw new BugResolutionException();
        }
        InfixExpression correctOddnessCheck = createCorrectOddnessCheck(rewrite, numberExpression);
        rewrite.replace(oddnessCheck, correctOddnessCheck, null);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.Expression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.