Revision 46084

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultCodeBuilder.java
76 76
        
77 77
        @Override
78 78
        public void accept(Visitor visitor) throws BaseException {
79
            visitor.visit(this);
79
            this.accept(visitor, null);
80 80
        }
81 81

  
82 82
        @Override
83 83
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
84
            if( !exclude.test(this) ) {
84
            if( exclude==null || !exclude.test(this) ) {
85 85
                visitor.visit(this);
86 86
            }
87 87
        }
......
347 347

  
348 348
        @Override
349 349
        public void accept(Visitor visitor) throws BaseException {
350
            for( Code arg : this.codes ) {
351
                if(arg!=null) {
352
                    arg.accept(visitor);
353
                }
354
            }
350
            this.accept(visitor, null);
355 351
        }
356 352

  
357 353
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
358
            if( !exclude.test(this) ) {
354
            if( this.codes != null ) {
359 355
                for( Code arg : this.codes ) {
360
                    if(arg!=null) {
356
                    if(arg!=null ) {
361 357
                        arg.accept(visitor, exclude);
362 358
                    }
363 359
                }
......
492 488
        }
493 489

  
494 490
        @Override
495
        public void accept(Visitor visitor) throws BaseException {
496
            visitor.visit(this);
491
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
492
            super.accept(visitor, exclude);
497 493
            if(this.args!=null) {
498
                this.args.accept(visitor);
494
                this.args.accept(visitor, exclude);
499 495
            }
500 496
        }
501 497

  
502 498
        @Override
503
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
504
            if( !exclude.test(this) ) {
505
                visitor.visit(this);
506
                if(this.args!=null) {
507
                    this.args.accept(visitor, exclude);
508
                }
509
            }
510
        }
511

  
512
        @Override
513 499
        public Value toValue(ExpressionBuilder builder) {
514 500
            ExpressionBuilder.Value value;
515 501
            switch(this.type) {
......
640 626
        }
641 627

  
642 628
        @Override
643
        public void accept(Visitor visitor) throws BaseException {
644
            visitor.visit(this);
629
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
630
            super.accept(visitor, exclude);
645 631
            if(this.instance!=null) {
646
                this.instance.accept(visitor);
632
               this.instance.accept(visitor, exclude);
647 633
            }            
648 634
            if(this.args!=null) {
649
                this.args.accept(visitor);
635
                this.args.accept(visitor, exclude);
650 636
            }            
651 637
        }
652
        
653
        @Override
654
        public void accept(Visitor visitor, Predicate<FilteredVisitable> exclude) throws BaseException {
655
            if( !exclude.test(this) ) {
656
                visitor.visit(this);
657
                if(this.instance!=null) {
658
                    this.instance.accept(visitor, exclude);
659
                }            
660
                if(this.args!=null) {
661
                    this.args.accept(visitor, exclude);
662
                }            
663
            }
664
        }
665 638

  
666 639
        @Override
667 640
        public Code clone() throws CloneNotSupportedException {

Also available in: Unified diff