示例#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);
             }
         }
     }
 }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
            }
        }
示例#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);
        }
示例#7
0
 public void setMemberOf(CategoryDeclaration declaration)
 {
     this.memberOf = declaration;
 }
示例#8
0
 public void setMemberOf(CategoryDeclaration declaration)
 {
     wrapped.setMemberOf(declaration);
 }
示例#9
0
 public WrappingWidgetDeclaration(CategoryDeclaration wrapped)
     : base(wrapped.GetName(), wrapped.getDerivedFrom()[0], wrapped.GetLocalMethods())
 {
 }