Examples of accept()


Examples of org.eclipse.jdt.core.dom.CatchClause.accept()

    }
    node.getBody().accept(this);
    this.buffer.append(" ");//$NON-NLS-1$
    for (Iterator it = node.catchClauses().iterator(); it.hasNext(); ) {
      CatchClause cc = (CatchClause) it.next();
      cc.accept(this);
    }
    if (node.getFinally() != null) {
      this.buffer.append(" finally ");//$NON-NLS-1$
      node.getFinally().accept(this);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Comment.accept()

      cu.accept(converter);
      for (Iterator it = cu.getCommentList().iterator(); it.hasNext();) {
        Comment comment = (Comment) it.next();
        if (comment.isDocComment())
          continue;
        comment.accept(converter);
      }
     
      return converter.getModel(true);
    } catch (IOException e) {
      throw RuntimeExceptionFactory.io(VF.string(e.getMessage()), null, null);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.CompilationUnit.accept()

    */

    List<MarkerData> generateAddedMethodMarker(IJavaProject javaProject, String className, final String methodName, final Delta requiresDelta) throws JavaModelException {
        final List<MarkerData> markers = new LinkedList<MarkerData>();
        final CompilationUnit ast = createAST(javaProject, className);
        ast.accept(new ASTVisitor() {
            @Override
            public boolean visit(MethodDeclaration methodDecl) {
                String signature = ASTUtil.buildMethodSignature(methodDecl);
                if (signature.equals(methodName)) {
                    // Create the marker attribs here
View Full Code Here

Examples of org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept()

      this.buffer.append(" ");//$NON-NLS-1$
    }
    this.buffer.append("{");//$NON-NLS-1$
    for (Iterator it = node.enumConstants().iterator(); it.hasNext(); ) {
      EnumConstantDeclaration d = (EnumConstantDeclaration) it.next();
      d.accept(this);
      // enum constant declarations do not include punctuation
      if (it.hasNext()) {
        // enum constant declarations are separated by commas
        this.buffer.append(", ");//$NON-NLS-1$
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Expression.accept()

    Type elementType = at.getElementType();
    elementType.accept(this);
    for (Iterator it = node.dimensions().iterator(); it.hasNext(); ) {
      this.buffer.append("[");//$NON-NLS-1$
      Expression e = (Expression) it.next();
      e.accept(this);
      this.buffer.append("]");//$NON-NLS-1$
      dims--;
    }
    // add empty "[]" for each extra array dimension
    for (int i= 0; i < dims; i++) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ImportDeclaration.accept()

    if (node.getPackage() != null) {
      node.getPackage().accept(this);
    }
    for (Iterator it = node.imports().iterator(); it.hasNext(); ) {
      ImportDeclaration d = (ImportDeclaration) it.next();
      d.accept(this);
    }
    for (Iterator it = node.types().iterator(); it.hasNext(); ) {
      AbstractTypeDeclaration d = (AbstractTypeDeclaration) it.next();
      d.accept(this);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Javadoc.accept()

     */
    public boolean visit(TypeDeclaration node) {
        Javadoc javadoc = node.getJavadoc();

        if (javadoc != null) {
            javadoc.accept(this);
        }

        _output(_indent);

        _outputModifiers(node.modifiers());
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MemberValuePair.accept()

    this.buffer.append("@");//$NON-NLS-1$
    node.getTypeName().accept(this);
    this.buffer.append("(");//$NON-NLS-1$
    for (Iterator it = node.values().iterator(); it.hasNext(); ) {
      MemberValuePair p = (MemberValuePair) it.next();
      p.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(")");//$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodDeclaration.accept()

      } catch (JavaModelException e) {
        logger.setLevel(Level.WARNING);
        logger.log(Level.SEVERE, "Do McCabe calculation..", e);
      }
      McCabeVisitor mcb = new McCabeVisitor(sourceCode);
      astNode.accept(mcb);
      values[0].setValue(mcb.getCyclomatic());
    }
  }

  @Override
View Full Code Here

Examples of org.eclipse.jdt.core.dom.MethodRefParameter.accept()

    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$
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.