Examples of BodyDeclaration


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

    return null;
  }

  @Override
  public Color getForeground(Object item, int columnIndex) {
    BodyDeclaration element = (BodyDeclaration) item;
    Color color = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);
    if (columnIndex == 2) {
      if (((String) element.getProperty(ResultProperty.EXECUTABILITY
          .name())).equals(Executability.TESTED.value())) {
        color = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
      }
    }
    return color;
View Full Code Here

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

    return color;
  }

  @Override
  public Color getBackground(Object item, int columnIndex) {
    BodyDeclaration element = (BodyDeclaration) item;
    Color color = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
    if (element.getNodeType() == ASTNode.TYPE_DECLARATION
        || element.getNodeType() == ASTNode.ENUM_DECLARATION) {
      color = Display.getCurrent().getSystemColor(
          SWT.COLOR_WIDGET_LIGHT_SHADOW);
    }
    if (columnIndex == 2
        && element.getNodeType() == ASTNode.TYPE_DECLARATION) {
      // Was testing / adaptation successful?
      if (((String) element.getProperty(ResultProperty.EXECUTABILITY
          .name())).equals(Executability.TESTED.value())) {
        // Set color to green if no adapter is necessary, yellow
        // otherwise
        if (((String) element.getProperty(ResultProperty.TEST_RESULT
            .name())).startsWith("// No adapter necessary")) {
          color = Display.getCurrent().getSystemColor(
              SWT.COLOR_DARK_GREEN);
        } else {
          color = Display.getCurrent().getSystemColor(
View Full Code Here

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

    return color;
  }

  @Override
  public Font getFont(Object item, int columnIndex) {
    BodyDeclaration element = (BodyDeclaration) item;
    if (element.getNodeType() == ASTNode.TYPE_DECLARATION
        && columnIndex == 0) {
      return JFaceResources.getFontRegistry().getBold(
          JFaceResources.DEFAULT_FONT);
    }
    return null;
View Full Code Here

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

    printModifiers(node.modifiers());
    this.buffer.append("@interface ");//$NON-NLS-1$
    node.getName().accept(this);
    this.buffer.append(" {");//$NON-NLS-1$
    for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext(); ) {
      BodyDeclaration d = (BodyDeclaration) it.next();
      d.accept(this);
    }
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
  }
View Full Code Here

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

   */
  public boolean visit(AnonymousClassDeclaration node) {
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext(); ) {
      BodyDeclaration b = (BodyDeclaration) it.next();
      b.accept(this);
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
View Full Code Here

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

      }
    }
    if (!node.bodyDeclarations().isEmpty()) {
      this.buffer.append("; ");//$NON-NLS-1$
      for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext(); ) {
        BodyDeclaration d = (BodyDeclaration) it.next();
        d.accept(this);
        // other body declarations include trailing punctuation
      }
    }
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
View Full Code Here

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

      }
    }
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext(); ) {
      BodyDeclaration d = (BodyDeclaration) it.next();
      d.accept(this);
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
View Full Code Here

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

        _output("@interface ");
        node.getName().accept(this);
        _openBrace();

        for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext();) {
            BodyDeclaration d = (BodyDeclaration) it.next();
            d.accept(this);
        }

        _checkComments((node.getStartPosition() + node.getLength()) - 1);
        _closeBrace();
        return false;
View Full Code Here

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

    public boolean visit(AnonymousClassDeclaration node) {
        _output(" ");
        _openBrace();

        for (Iterator it = node.bodyDeclarations().iterator(); it.hasNext();) {
            BodyDeclaration b = (BodyDeclaration) it.next();
            b.accept(this);
        }

        _checkComments((node.getStartPosition() + node.getLength()) - 1);
        _closeBrace(false);
        return false;
View Full Code Here

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

            _output(" ");
        }

        _openBrace();

        BodyDeclaration prev = null;
        Iterator it;

        for (it = node.bodyDeclarations().iterator(); it.hasNext();) {
            BodyDeclaration d = (BodyDeclaration) it.next();

            if (prev instanceof EnumConstantDeclaration) {
                // enum constant declarations do not include punctuation
                if (d instanceof EnumConstantDeclaration) {
                    // enum constant declarations are separated by commas
                    _output(", ");
                } else {
                    // semicolon separates last enum constant declaration from
                    // first class body declarations
                    _output("; ");
                }
            }

            d.accept(this);
        }

        _checkComments((node.getStartPosition() + node.getLength()) - 1);
        _closeBrace();
        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.