Package org.eclipse.dltk.ast.declarations

Examples of org.eclipse.dltk.ast.declarations.ModuleDeclaration.traverse()


      caret = offset + styledText.getCaretOffset();
    }
    RutaReferenceVisitor visitor1 = new RutaReferenceVisitor(caret);
    ASTNode node = null;
    try {
      parsed.traverse(visitor1);
    } catch (Exception e) {
    }
    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(caret);
View Full Code Here


    }
    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(caret);
      try {
        parsed.traverse(visitor2);
      } catch (Exception e) {
      }
      node = visitor2.getResult();
    }
    if (node != null) {
View Full Code Here

      node = visitor2.getResult();
    }
    if (node != null) {
      ReferenceFinder refFinder = new ReferenceFinder(node);
      try {
        parsed.traverse(refFinder);
      } catch (Exception e) {
      }
      List<ASTNode> result = refFinder.getResult();
      myAnnotations = new HashMap<Annotation, Position>(result.size());
      for (ASTNode each : result) {
View Full Code Here

    RutaSelectionParser parser = new RutaSelectionParser();
    ISourceModule unit = (ISourceModule) getInputModelElement();
    ModuleDeclaration parsed = parser.parse(unit);
    RutaRuleIdVisitor visitor = new RutaRuleIdVisitor(id);
    try {
      parsed.traverse(visitor);
    } catch (Exception e) {
    }
    RutaRule rule = visitor.getResult();
    myAnnotations = new HashMap<Annotation, Position>();
    if (rule != null) {
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

        }
       
        try {
            ISourceModule sourceModule = context.getSourceModule();    
            ModuleDeclaration moduleDeclaration = SourceParserUtil.getModuleDeclaration(sourceModule);
            moduleDeclaration.traverse(new AutoloadVisitor(context.getSourceModule()));
        } catch (Exception e) {
            Logger.logException(e);
        }       
    }
}
View Full Code Here

      caret = offset + styledText.getCaretOffset();
    }
    RutaReferenceVisitor visitor1 = new RutaReferenceVisitor(caret);
    ASTNode node = null;
    try {
      parsed.traverse(visitor1);
    } catch (Exception e) {
    }
    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(
View Full Code Here

    node = visitor1.getResult();
    if (node == null) {
      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(
              caret);
      try {
        parsed.traverse(visitor2);
      } catch (Exception e) {
      }
      node = visitor2.getResult();
    }
    if (node != null) {
View Full Code Here

      node = visitor2.getResult();
    }
    if (node != null) {
      ReferenceFinder refFinder = new ReferenceFinder(node);
      try {
        parsed.traverse(refFinder);
      } catch (Exception e) {
      }
      List<ASTNode> result = refFinder.getResult();
      myAnnotations = new HashMap<Annotation, Position>(result.size());
      for (ASTNode each : result) {
View Full Code Here

    RutaSelectionParser parser = new RutaSelectionParser();
    ISourceModule unit = (ISourceModule) getInputModelElement();
    ModuleDeclaration parsed = parser.parse(unit);
    RutaRuleIdVisitor visitor = new RutaRuleIdVisitor(id);
    try {
      parsed.traverse(visitor);
    } catch (Exception e) {
    }
    RutaRule rule = visitor.getResult();
    myAnnotations = new HashMap<Annotation, Position>();
    if (rule != null) {
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.