Examples of Visitor


Examples of org.eclipse.epsilon.emc.jdt.test.util.Visitor

  public void testGetMethodDeclarationIPackageFragment() throws CoreException {
    List <MethodDeclaration> expectedMethodList = new ArrayList<MethodDeclaration>();
    ICompilationUnit [] iUnits = packageFragment.getCompilationUnits();     
    for(ICompilationUnit iUnit : iUnits){
      CompilationUnit unit = Visitor.parse(iUnit);
      Visitor visitor = new Visitor();
      unit.accept(visitor);
      List <TypeDeclaration> typeList = new ArrayList<TypeDeclaration>(visitor.getClasses());
      for(TypeDeclaration typeDeclaration: typeList){
        expectedMethodList.addAll(Arrays.asList(typeDeclaration.getMethods()));
      }
    }
   
View Full Code Here

Examples of org.jboss.util.graph.Visitor

/* 90 */     return new ValueVertex(value);
/*    */   }
/*    */
/*    */   public Visitor<String> visitor()
/*    */   {
/* 95 */     return new Visitor()
/*    */     {
/*    */       public void visit(Graph<String> g, Vertex<String> v)
/*    */       {
/* 99 */         if (DefaultVertexFactory.this.logger.isTraceEnabled())
/* 100 */           DefaultVertexFactory.this.logger.trace(v);
View Full Code Here

Examples of org.jruby.RubyHash.Visitor

        final Map<String, String> map = new HashMap<String, String>();
       
        // Get map of all fields we want to define. 
        for (int i = 0; i < args.length; i++) {
            if (args[i] instanceof RubyHash) {
                ((RubyHash) args[i]).visitAll(new Visitor() {
                    @Override
                    public void visit(IRubyObject key, IRubyObject value) {
                        map.put(key.asString().toString(), value.asString().toString());
                    }
                });
View Full Code Here

Examples of org.jruby.RubyHash.Visitor

        final Map<String, String> map = new HashMap<String, String>();
       
        // Get map of all fields we want to define. 
        for (int i = 0; i < args.length; i++) {
            if (args[i] instanceof RubyHash) {
                ((RubyHash) args[i]).visitAll(new Visitor() {
                    @Override
                    public void visit(IRubyObject key, IRubyObject value) {
                        map.put(key.asString().toString(), value.asString().toString());
                    }
                });
View Full Code Here

Examples of org.luaj.vm2.ast.Visitor

    }
   
    private void multiAssign(final List varsOrNames, List<Exp> exps) {
      final boolean[] needsTmpvarsMultiAssign = { false };
      if ( exps.size() > 1 ) {
        new Visitor() {
          public void visit(FuncBody body) {}
          public void visit(FieldExp exp) { needsTmpvarsMultiAssign[0] = true; }
          public void visit(FuncCall exp) { needsTmpvarsMultiAssign[0] = true; }
          public void visit(IndexExp exp) { needsTmpvarsMultiAssign[0] = true; }
          public void visit(MethodCall exp) { needsTmpvarsMultiAssign[0] = true; }
View Full Code Here

Examples of org.modeshape.jcr.query.model.Visitor

            // Get the list of property and reference expressions that are used in the Ordering instances, using a visitor. Other
            // kinds of
            // dynamic operands in Ordering instances will not need to change the columns
            final Set<Column> sortColumns = new HashSet<Column>();
            Visitor columnVisitor = new Visitors.AbstractVisitor() {
                @Override
                public void visit( PropertyValue prop ) {
                    sortColumns.add(columnFor(prop.selectorName(), prop.getPropertyName(), includeSourceName));
                }
View Full Code Here

Examples of org.olat.core.util.tree.Visitor

          }
          insertParent.insert(moveCopyFrom, insertPos);

          moveCopyFrom.setDirty(true);
          //mark subtree as dirty
          TreeVisitor tv = new TreeVisitor( new Visitor() {
            public void visit(INode node) {
              CourseEditorTreeNode cetn = (CourseEditorTreeNode)node;
              cetn.setDirty(true);
            }
          },moveCopyFrom,true);
View Full Code Here

Examples of org.olat.core.util.tree.Visitor

    CourseEditorTreeNode rootNode = (CourseEditorTreeNode) editorModel.getRootNode();
    final List<CourseNode> nodes = new ArrayList<CourseNode>();
    // visitor class: takes all assessable nodes if not the exclude node and
    // puts
    // them into the nodes list
    Visitor visitor = new Visitor() {
      public void visit(INode node) {
        CourseEditorTreeNode editorNode = (CourseEditorTreeNode) node;
        CourseNode courseNode = editorModel.getCourseNode(node.getIdent());
        if (!editorNode.isDeleted() && (courseNode != excludeNode)) {
          if(checkIfNodeIsAssessable(courseNode)) {
View Full Code Here

Examples of org.olat.core.util.tree.Visitor

    FileUtils.copyDirToDir(getIsolatedCourseFolder().getBasefile(), exportDirectory);
    // export any node data
    File fExportedDataDir = new File(exportDirectory, EXPORTED_DATA_FOLDERNAME);
    fExportedDataDir.mkdirs();
    log.info("exportToFilesystem: exporting course "+this+": exporting all nodes...");
    Visitor visitor = new NodeExportVisitor(fExportedDataDir, this);
    TreeVisitor tv = new TreeVisitor(visitor, getEditorTreeModel().getRootNode(), true);
    tv.visitAll();
    log.info("exportToFilesystem: exporting course "+this+": exporting all nodes...done.");
   
    //OLAT-5368: do intermediate commit to avoid transaction timeout
View Full Code Here

Examples of org.olat.core.util.tree.Visitor

    /*
     * the tree is visited and the book keeping lists are filled. the visitor
     * itself does not delete or modify neither runstructure nor editor tree
     * model. The whole complexity of published is encapsulated in the visitor.
     */
    Visitor nodePublishV = new NodePublishVisitor(editorRoot, nodesIdsToPublish, existingCourseRun);
    TreeVisitor tv = new TreeVisitor(nodePublishV, editorRoot, visitChildrenFirst);
    tv.visitAll();
    /*
     *
     */
 
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.