public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     foreach (var child in LinqUtils <Element> .WhereList(children, (_shouldPaint)))
     {
         visitor(child);
     }
 }
Пример #2
0
 public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     if (!widget.offstage)
     {
         base.debugVisitOnstageChildren(visitor);
     }
 }
Пример #3
0
 public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     LinqUtils <Element> .WhereList(children, (e => {
         RenderSliver renderSliver = (RenderSliver)e.renderObject;
         return(renderSliver.geometry.visible);
     })).ForEach(e => visitor(e));
 }
Пример #4
0
 public override void visitChildren(ElementVisitor visitor)
 {
     if (this._child != null)
     {
         visitor(this._child);
     }
 }
Пример #5
0
 public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     this.children.Where(e => {
         RenderSliver renderSliver = (RenderSliver)e.renderObject;
         return(renderSliver.geometry.visible);
     }).ToList().ForEach(e => visitor(e));
 }
Пример #6
0
 public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     if (this._onstage != null)
     {
         visitor(this._onstage);
     }
 }
Пример #7
0
 public override void visitChildren(ElementVisitor visitor)
 {
     foreach (var element in this.slotToChild.Values)
     {
         visitor(element);
     }
 }
Пример #8
0
 public override void visitChildren(ElementVisitor visitor)
 {
     foreach (var item in this._childElements)
     {
         visitor(item.Value);
     }
 }
Пример #9
0
 public override void visitChildren(ElementVisitor visitor)
 {
     D.assert(!_childElements.Values.Any(child => child == null));
     foreach (var e in _childElements.Values)
     {
         visitor(e);
     }
 }
Пример #10
0
 public override void debugVisitOnstageChildren(ElementVisitor visitor)
 {
     D.assert(children.Count() >= widget.skipCount);
     foreach (var item in children.Skip(widget.skipCount))
     {
         visitor(item);
     }
 }
 public override void visitChildren(ElementVisitor visitor)
 {
     if (_prototype != null)
     {
         visitor(_prototype);
     }
     base.visitChildren(visitor);
 }
Пример #12
0
 public FunctionVisitor(Type annotationType, Types types, Elements elements, TypeMirrorUtils typeMirrorUtils, System.Func <T, Optional <string> > customNameExtractor, bool ignoresWarnings)
 {
     annotationType              = typeof(T);
     this._customNameExtractor   = customNameExtractor;
     this._annotationType        = annotationType;
     this._classVisitor          = new ExtensionClassVisitor(types, elements, ignoresWarnings);
     this._parameterVisitor      = new ParameterVisitor(new ParameterTypeVisitor(types, typeMirrorUtils));
     this._elements              = elements;
     this._allowedTypesValidator = new AllowedTypesValidator(typeMirrorUtils, types);
 }
Пример #13
0
        public ProcedureVisitor(Types typeUtils, Elements elementUtils, bool ignoresWarnings)
        {
            TypeMirrorUtils typeMirrors = new TypeMirrorUtils(typeUtils, elementUtils);

            this._typeUtils            = typeUtils;
            this._elementUtils         = elementUtils;
            this._classVisitor         = new ExtensionClassVisitor(typeUtils, elementUtils, ignoresWarnings);
            this._recordVisitor        = new RecordTypeVisitor(typeUtils, typeMirrors);
            this._parameterVisitor     = new ParameterVisitor(new ParameterTypeVisitor(typeUtils, typeMirrors));
            this._performsWriteVisitor = new PerformsWriteMethodVisitor();
        }
Пример #14
0
 public static void each <Element>(this IEnumerable <Element> items, ElementVisitor <Element> visitor)
 {
     foreach (var element in items)
     {
         var result = visitor(element);
         if (!result)
         {
             return;
         }
     }
 }
Пример #15
0
        public override void Init(ProcessingEnvironment processingEnv)
        {
            lock (this)
            {
                base.Init(processingEnv);

                _messagePrinter       = new MessagePrinter(processingEnv.Messager);
                _duplicationValidator = new DuplicatedExtensionValidator <ICollection <Element>, Stream <CompilationMessage> >(processingEnv.ElementUtils, _supportedAnnotationType, _customNameFunction);
                _visitor = _visitorSupplier.apply(processingEnv);
            }
        }
Пример #16
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void prepare()
        public virtual void Prepare()
        {
            Types    types    = CompilationRule.Types;
            Elements elements = CompilationRule.Elements;

            _elementTestUtils = new ElementTestUtils(CompilationRule);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils typeMirrorUtils = new org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils(types, elements);
            TypeMirrorUtils typeMirrorUtils = new TypeMirrorUtils(types, elements);

            _visitor = new UserFunctionVisitor(new FunctionVisitor <UserFunction>(typeof(UserFunction), types, elements, typeMirrorUtils, function => CustomNameExtractor.getName(function.name, function.value), false));
        }
Пример #17
0
        public override void visitChildren(ElementVisitor visitor)
        {
            if (_contentElement != null)
            {
                visitor(_contentElement);
            }

            if (_actionsElement != null)
            {
                visitor(_actionsElement);
            }
        }
Пример #18
0
 public override void visitChildren(ElementVisitor visitor)
 {
     foreach (_TableElementRow row in _children)
     {
         foreach (Element child in row.children)
         {
             if (!_forgottenChildren.Contains(child))
             {
                 visitor(child);
             }
         }
     }
 }
Пример #19
0
        /**
         * Walks child nodes of the given node.
         * @param element
         * @param visitors Map of tag names to visitors for that tag.
         */
        private static void walk(XmlElement element, Dictionary <String, ElementVisitor> visitors)
        {
            XmlNodeList children = element.ChildNodes;

            for (int i = 0, j = children.Count; i < j; ++i)
            {
                XmlNode        child   = children[i];
                ElementVisitor visitor = visitors[child.Name];
                if (visitor != null)
                {
                    visitor.visit((XmlElement)child);
                }
            }
        }
Пример #20
0
        public override void visitChildren(ElementVisitor visitor)
        {
            if (this._onstage != null)
            {
                visitor(this._onstage);
            }

            foreach (var child in this._offstage)
            {
                if (!this._forgottenOffstageChildren.Contains(child))
                {
                    visitor(child);
                }
            }
        }
            public override Document VisitParse([NotNull] ParseContext context)
            {
                var elementVisitor = new ElementVisitor().Inherit(this);
                var raw            = new List <IElement>();

                foreach (var element in context.element())
                {
                    var item = elementVisitor.VisitElement(element);
                    raw.Add(item);
                }

                var result = new Document();

                result.Eat(raw, this);
                return(result);
            }
            public override Section VisitSection(SectionContext context)
            {
                var titleVisitor   = new TextAreasVisitor().Inherit(this);
                var title          = titleVisitor.VisitTitle(context.title());
                var separator      = context.SectionSeparator()[0].GetText();
                var level          = SectionTracker.Track(separator[0]);
                var list           = new List <IElement>();
                var elementVisitor = new ElementVisitor().Inherit(this);
                var element        = context.sectionElement();

                if (element != null)
                {
                    foreach (var item in element)
                    {
                        list.Add(elementVisitor.VisitSectionElement(item));
                    }
                }

                return(new Section(level, title, list, context.overline != null));
            }
Пример #23
0
        public override void debugVisitOnstageChildren(ElementVisitor visitor)
        {
            this._childElements.Values.Where(child => {
                SliverMultiBoxAdaptorParentData parentData =
                    (SliverMultiBoxAdaptorParentData)child.renderObject.parentData;
                double itemExtent = 0;
                switch (this.renderObject.constraints.axis)
                {
                case Axis.horizontal:
                    itemExtent = child.renderObject.paintBounds.width;
                    break;

                case Axis.vertical:
                    itemExtent = child.renderObject.paintBounds.height;
                    break;
                }

                return(parentData.layoutOffset < this.renderObject.constraints.scrollOffset +
                       this.renderObject.constraints.remainingPaintExtent &&
                       parentData.layoutOffset + itemExtent > this.renderObject.constraints.scrollOffset);
            }).ToList().ForEach(e => visitor(e));
        }
Пример #24
0
        public override void debugVisitOnstageChildren(ElementVisitor visitor)
        {
            LinqUtils <Element> .WhereList(_childElements.Values, (child => {
                SliverMultiBoxAdaptorParentData parentData =
                    (SliverMultiBoxAdaptorParentData)child.renderObject.parentData;
                float itemExtent = 0;
                switch (renderObject.constraints.axis)
                {
                case Axis.horizontal:
                    itemExtent = child.renderObject.paintBounds.width;
                    break;

                case Axis.vertical:
                    itemExtent = child.renderObject.paintBounds.height;
                    break;
                }

                return(parentData.layoutOffset != null &&
                       parentData.layoutOffset < renderObject.constraints.scrollOffset + renderObject.constraints.remainingPaintExtent &&
                       parentData.layoutOffset + itemExtent > renderObject.constraints.scrollOffset);
            })).ForEach(e => visitor(e));
        }
            public override IElement VisitElement([NotNull] ElementContext context)
            {
                var sectionContext = context.section();

                if (sectionContext != null)
                {
                    var sectionVisitor = new SectionVisitor().Inherit(this);
                    var section        = sectionVisitor.VisitSection(sectionContext);
                    return(section);
                }

                var sectionElementContext = context.sectionElement();

                if (sectionElementContext != null)
                {
                    var elementVisitor = new ElementVisitor().Inherit(this);
                    var element        = elementVisitor.VisitSectionElement(context.sectionElement());
                    return(element);
                }

                //TODO: throw a better exception.
                throw new InvalidOperationException();
            }
Пример #26
0
 public override void AcceptVisitor(ElementVisitor visitor)
 {
     visitor.Visit(this);
 }
Пример #27
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void prepare()
        public virtual void Prepare()
        {
            _elementTestUtils = new ElementTestUtils(CompilationRule);
            _fieldVisitor     = new FieldVisitor(CompilationRule.Types, CompilationRule.Elements, true);
        }
Пример #28
0
 public UserAggregationFunctionVisitor(FunctionVisitor <UserAggregationFunction> baseFunctionVisitor, Types types)
 {
     this._functionVisitor = baseFunctionVisitor;
     this._types           = types;
     this._typeVisitor     = new QualifiedTypeVisitor();
 }
Пример #29
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void prepare()
        public virtual void Prepare()
        {
            _elementTestUtils    = new ElementTestUtils(CompilationRule);
            _contextFieldVisitor = new ContextFieldVisitor(CompilationRule.Types, CompilationRule.Elements, false);
        }
Пример #30
0
 public FieldVisitor(Types types, Elements elements, bool ignoresWarnings)
 {
     _contextFieldVisitor = new ContextFieldVisitor(types, elements, ignoresWarnings);
 }