Package org.eclipse.jdt.core.dom

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


            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        parser.setSource(writer.toString().toCharArray());
        ASTNode ast = parser.createAST(new NullProgressMonitor());
        ast.accept(new ASTVisitor() {

            private Map<String, String> _imports = new HashMap<String, String>();
           
            @Override
            public void endVisit(TypeDeclaration node) {
View Full Code Here


        }
        catch (IOException e) {
        }
        parser.setSource(writer.toString().toCharArray());
        ASTNode ast = parser.createAST(new NullProgressMonitor());
        ast.accept(new ASTVisitor() {
            private Map<String, String> _imports = new HashMap<String, String>();

            @Override
            public void endVisit(ImportDeclaration node) {
                String packageName = node.getName().toString();
View Full Code Here

            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        parser.setSource(writer.toString().toCharArray());
        ASTNode ast = parser.createAST(new NullProgressMonitor());
        ast.accept(new ASTVisitor() {
           
            private Map<String, String> _imports = new HashMap<String, String>();

            @Override
            public void endVisit(ImportDeclaration node) {
View Full Code Here

    Iterator<ICompilationUnit> compUnitIterator = compUnits.iterator();
    ICompilationUnit icu;
    for(;compUnitIterator.hasNext();){
      icu = compUnitIterator.next();
      ASTNode node = compilationUnitToASTNode.get(icu);
      node.accept(new BindingsCollectorVisitor(bindings));
    }
    return bindings;
  }

View Full Code Here

    ICompilationUnit comp_unit = model_element.getCompilationUnit();
    ASTNode node = getASTNodeFromCompilationUnit(comp_unit);
   
    // Now, find the corresponding type node
    final Box<NODETYPE> result = new Box<NODETYPE>(null);
    node.accept(new ASTVisitor() {
     
      @Override
      public void postVisit(ASTNode node) {
        // If this node is a subtype of the node we are
        // interested in, then we can ask the client's
View Full Code Here

    Iterator<ICompilationUnit> compUnitIterator = compUnits.iterator();
    ICompilationUnit icu;
    for(;compUnitIterator.hasNext();){
      icu = compUnitIterator.next();
      ASTNode node = compilationUnitToASTNode.get(icu);
      node.accept(new BindingsCollectorVisitor(bindings));
    }
    return bindings;
  }

View Full Code Here

    ICompilationUnit comp_unit = model_element.getCompilationUnit();
    ASTNode node = getASTNodeFromCompilationUnit(comp_unit);
   
    // Now, find the corresponding type node
    final Box<NODETYPE> result = new Box<NODETYPE>(null);
    node.accept(new ASTVisitor() {
     
      @Override
      public void postVisit(ASTNode node) {
        // If this node is a subtype of the node we are
        // interested in, then we can ask the client's
View Full Code Here

   * (element type: <code>IExtendedModifiers</code>)
   */
  void printModifiers(List ext) {
    for (Iterator it = ext.iterator(); it.hasNext(); ) {
      ASTNode p = (ASTNode) it.next();
      p.accept(this);
      this.buffer.append(" ");//$NON-NLS-1$
    }
  }

  /**
 
View Full Code Here

  public boolean visit(Javadoc node) {
    printIndent();
    this.buffer.append("/** ");//$NON-NLS-1$
    for (Iterator it = node.tags().iterator(); it.hasNext(); ) {
      ASTNode e = (ASTNode) it.next();
      e.accept(this);
    }
    this.buffer.append("\n */\n");//$NON-NLS-1$
    return false;
  }

View Full Code Here

      previousRequiresNewLine = currentIncludesWhiteSpace;
      // add space if required to separate
      if (previousRequiresWhiteSpace && !currentIncludesWhiteSpace) {
        this.buffer.append(" "); //$NON-NLS-1$
      }
      e.accept(this);
      previousRequiresWhiteSpace = !currentIncludesWhiteSpace && !(e instanceof TagElement);
    }
    if (node.isNested()) {
      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.