Package org.eclipse.dltk.ast

Examples of org.eclipse.dltk.ast.ASTVisitor


    // traverse:
    ISourceLineTracker linetracker = context.getLineTracker();
    String fileName = smod.getElementName();
    try {
      ASTVisitor visitor = new EngineAndCallCheckerVisitor(problemReporter, linetracker, fileName);
      md.traverse(visitor);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here


      for (String dep : dependencies) {
        urls[counter] = new File(dep).toURI().toURL();
        counter++;
      }
      ClassLoader classloader = new URLClassLoader(urls);
      ASTVisitor visitor = new LanguageCheckerVisitor(problemReporter, linetracker, smod,
              classloader);
      md.traverse(visitor);
    } catch (Exception e) {
      RutaIdeUIPlugin.error(e);
    }
View Full Code Here

    } else if (node instanceof Block) {
      return ((Block) node).getStatements();
    } else {
      final List innerBlockStatements = new ArrayList();
      // Lets traverse to see inner blocks.
      ASTVisitor visitor = new ASTVisitor() {
        @Override
        public boolean visit(Expression s) throws Exception {
          if (s instanceof Block) {
            List tStatements = ((Block) s).getStatements();
            innerBlockStatements.addAll(tStatements);
View Full Code Here

    }
  }

  public static List findExtractBlocks(ASTNode node) {
    final List statements2 = new ArrayList();
    ASTVisitor visitor = new ASTVisitor() {
      @Override
      public boolean visit(Expression s) throws Exception {
        if (s instanceof Block) {
          statements2.addAll(((Block) s).getStatements());
        }
View Full Code Here

    if (md == null) {
      return new PairBlock[0];
    }
    final List result = new ArrayList();
    try {
      md.traverse(new ASTVisitor() {
        @Override
        public boolean visitGeneral(ASTNode node) throws Exception {
          if (node instanceof StringLiteral) {
            StringLiteral be = (StringLiteral) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '\"'));
View Full Code Here

    } else if (node instanceof Block) {
      return ((Block) node).getStatements();
    } else {
      final List innerBlockStatements = new ArrayList();
      // Lets traverse to see inner blocks.
      ASTVisitor visitor = new ASTVisitor() {
        @Override
        public boolean visit(Expression s) throws Exception {
          if (s instanceof Block) {
            List tStatements = ((Block) s).getStatements();
            innerBlockStatements.addAll(tStatements);
View Full Code Here

    if (md == null) {
      return new PairBlock[0];
    }
    final List result = new ArrayList();
    try {
      md.traverse(new ASTVisitor() {
        @Override
        public boolean visitGeneral(ASTNode node) throws Exception {
          if (node instanceof StringLiteral) {
            StringLiteral be = (StringLiteral) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '\"'));
View Full Code Here

    }
  }

  public static List findExtractBlocks(ASTNode node) {
    final List statements2 = new ArrayList();
    ASTVisitor visitor = new ASTVisitor() {
      @Override
      public boolean visit(Expression s) throws Exception {
        if (s instanceof Block) {
          statements2.addAll(((Block) s).getStatements());
        }
View Full Code Here

    // traverse:
    ISourceLineTracker linetracker = context.getLineTracker();
    String fileName = smod.getElementName();
    try {
      ASTVisitor visitor = new TypeCheckerVisitor(problemReporter, linetracker, fileName, types);
      md.traverse(visitor);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    // traverse:
    ISourceLineTracker linetracker = context.getLineTracker();
    String fileName = smod.getElementName();
    try {
      ASTVisitor visitor = new EngineAndCallCheckerVisitor(problemReporter, linetracker, fileName);
      md.traverse(visitor);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.ASTVisitor

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.