Ejemplo n.º 1
0
 public void processAnnotations(Context context, bool processDerivedFrom)
 {
     if (processDerivedFrom)
     {
         IdentifierList derivedFrom = getDerivedFrom();
         if (derivedFrom != null)
         {
             foreach (String name in derivedFrom)
             {
                 CategoryDeclaration decl = context.getRegisteredDeclaration <CategoryDeclaration>(name);
                 if (decl != null)
                 {
                     decl.processAnnotations(context, true);
                 }
             }
         }
         if (Annotations != null)
         {
             foreach (Annotation a in Annotations)
             {
                 a.processCategory(context, this);
             }
         }
     }
 }
Ejemplo n.º 2
0
        private static bool ancestorHasMethod(String ancestor, Context context, String name)
        {
            CategoryDeclaration actual = context.getRegisteredDeclaration <CategoryDeclaration>(ancestor);

            if (actual == null)
            {
                return(false);
            }
            return(actual.hasMethod(context, name));
        }
Ejemplo n.º 3
0
        public override bool IsAWidget(Context context)
        {
            if (derivedFrom == null || derivedFrom.Count != 1)
            {
                return(false);
            }
            CategoryDeclaration parent = context.getRegisteredDeclaration <CategoryDeclaration>(derivedFrom[0]);

            return(parent.IsAWidget(context));
        }
Ejemplo n.º 4
0
        private static bool isAncestorDerivedFrom(String ancestor, Context context, CategoryType categoryType)
        {
            IDeclaration actual = context.getRegisteredDeclaration <IDeclaration>(ancestor);

            if (actual == null || !(actual is CategoryDeclaration))
            {
                return(false);
            }
            CategoryDeclaration cd = (CategoryDeclaration)actual;

            return(cd.isDerivedFrom(context, categoryType));
        }
Ejemplo n.º 5
0
        private HashSet <String> GetAncestorAttributes(Context context, String ancestor)
        {
            CategoryDeclaration actual = context.getRegisteredDeclaration <CategoryDeclaration>(ancestor);

            if (actual == null)
            {
                return(null);
            }
            else
            {
                return(actual.GetAllAttributes(context));
            }
        }
Ejemplo n.º 6
0
        public List <Annotation> GetAllAnnotations(Context context)
        {
            List <Annotation> result      = new List <Annotation>();
            IdentifierList    derivedFrom = getDerivedFrom();

            if (derivedFrom != null)
            {
                foreach (String name in derivedFrom)
                {
                    CategoryDeclaration decl = context.getRegisteredDeclaration <CategoryDeclaration>(name);
                    if (decl != null)
                    {
                        result.AddRange(decl.GetAllAnnotations(context));
                    }
                }
            }
            if (Annotations != null)
            {
                result.AddRange(Annotations);
            }
            return(result);
        }
Ejemplo n.º 7
0
 public void setMemberOf(CategoryDeclaration declaration)
 {
     this.memberOf = declaration;
 }
Ejemplo n.º 8
0
 public void setMemberOf(CategoryDeclaration declaration)
 {
     wrapped.setMemberOf(declaration);
 }
Ejemplo n.º 9
0
 public WrappingWidgetDeclaration(CategoryDeclaration wrapped)
     : base(wrapped.GetName(), wrapped.getDerivedFrom()[0], wrapped.GetLocalMethods())
 {
 }