private void GenerateMember(object node)
        {
            var names = node.GetNames();
            var itemType = node.Get<string>("itemtype");
            var name = node.Get<string>("name");
            var access = node.Get<string>("access");
            if (name.IsNullOrEmpty())
            {
                Console.WriteLine("Warning: empty name " + name);
                return;
            }
            var className = node.Get<string>("class");
            if (name == "content" && className.Contains("EditorBase"))
            {
            }
            var type = node.Get<string>("type");
            var ce = FindClass(className);
            if (ce == null)
            {
                Console.WriteLine("Warning: Can't find class: " + className);
                return;
            }
            Element me2 = null;
            if (itemType == "attribute" || itemType == "property")
            {
                var isReadOnly = node.Get<string>("readonly") != null;
                if (type.IsNullOrEmpty())
                {
                    type = "object";
                    Console.WriteLine("Warning: type is null: " + className + "." + name + " assuming object");
                    //return;
                }
                var pe = new Property
                {
                    Name = name,
                    Type = FindClass(type),
                };
                pe.IsReadOnly = isReadOnly;
                if (Char.IsDigit(pe.Name[0]))
                {
                    Console.WriteLine("Warning: Invalid name " + pe.Name);
                    return;
                }
                if (pe.Type == null)
                {
                    Console.WriteLine("Warning: type is null");
                    return;
                }

                ce.Members.Add(pe);
                if (itemType == "attribute")
                {
                    var ctor = ce.GetEmptyConstructor();
                    if (ctor == null)
                    {
                        ctor = new Method
                        {
                            IsConstructor = true,
                            Name=".ctor",
                        };
                        ce.Members.Add(ctor);
                    }
                    var att = ctor.Attributes.Where(t => t.Name == "JsMethod").FirstOrDefault();
                    if (att == null)
                    {
                        att = new SharpKit.ExtJs4.Generator.Attribute
                        {
                            Name = "JsMethod",
                            NamedParamters = new Dictionary<string, string> { { "JsonInitializers", "true" } },
                        };
                        ctor.Attributes.Add(att);
                    }
                }
                me2 = pe;
            }
            else if (itemType == "method")
            {
                var prms = node.GetValues("params");
                var returns = node.GetValues("return");
                var me = new Method
                {
                    Name = name,
                    //Type = FindClass(type),
                };
                if (prms != null)
                    me.Parameters = prms.Select(GenerateParameter).ToList();
                if (me.Parameters.Contains(null))
                {
                    Console.WriteLine("Warning: prms contains nulls:" + className + "." + name);
                    return;
                }
                if (returns != null)
                {
                    var returnType = returns.LastOrDefault() as string;
                    returnType = returnType.Split('|').FirstOrDefault().Trim();
                    me.Type = FindClass(returnType);
                    if (me.Type == null)
                    {
                        Console.WriteLine("Cannot resolve method return type: " + className + "." + name);
                        me.Type = ObjectClass;
                    }
                }

                ce.Members.Add(me);
                me2 = me;
            }
            if (me2 != null)
            {
                if (access.IsNullOrEmpty())
                {
                }
                else if (access == "protected")
                    me2.IsProtected = true;
                else if (access == "private")
                    me2.IsPrivate = true;
                else if (access == "public")
                {
                }
                else
                {
                }
                ImportDocumentation(me2, node);

            }
        }
        private void GenerateMember(object node)
        {
            var names    = node.GetNames();
            var itemType = node.Get <string>("itemtype");
            var name     = node.Get <string>("name");
            var access   = node.Get <string>("access");

            if (name.IsNullOrEmpty())
            {
                Console.WriteLine("Warning: empty name " + name);
                return;
            }
            var className = node.Get <string>("class");

            if (name == "content" && className.Contains("EditorBase"))
            {
            }
            var type = node.Get <string>("type");
            var ce   = FindClass(className);

            if (ce == null)
            {
                Console.WriteLine("Warning: Can't find class: " + className);
                return;
            }
            Element me2 = null;

            if (itemType == "attribute" || itemType == "property")
            {
                var isReadOnly = node.Get <string>("readonly") != null;
                if (type.IsNullOrEmpty())
                {
                    type = "object";
                    Console.WriteLine("Warning: type is null: " + className + "." + name + " assuming object");
                    //return;
                }
                var pe = new Property
                {
                    Name = name,
                    Type = FindClass(type),
                };
                pe.IsReadOnly = isReadOnly;
                if (Char.IsDigit(pe.Name[0]))
                {
                    Console.WriteLine("Warning: Invalid name " + pe.Name);
                    return;
                }
                if (pe.Type == null)
                {
                    Console.WriteLine("Warning: type is null");
                    return;
                }

                ce.Members.Add(pe);
                if (itemType == "attribute")
                {
                    var ctor = ce.GetEmptyConstructor();
                    if (ctor == null)
                    {
                        ctor = new Method
                        {
                            IsConstructor = true,
                            Name          = ".ctor",
                        };
                        ce.Members.Add(ctor);
                    }
                    var att = ctor.Attributes.Where(t => t.Name == "JsMethod").FirstOrDefault();
                    if (att == null)
                    {
                        att = new SharpKit.ExtJs4.Generator.Attribute
                        {
                            Name           = "JsMethod",
                            NamedParamters = new Dictionary <string, string> {
                                { "JsonInitializers", "true" }
                            },
                        };
                        ctor.Attributes.Add(att);
                    }
                }
                me2 = pe;
            }
            else if (itemType == "method")
            {
                var prms    = node.GetValues("params");
                var returns = node.GetValues("return");
                var me      = new Method
                {
                    Name = name,
                    //Type = FindClass(type),
                };
                if (prms != null)
                {
                    me.Parameters = prms.Select(GenerateParameter).ToList();
                }
                if (me.Parameters.Contains(null))
                {
                    Console.WriteLine("Warning: prms contains nulls:" + className + "." + name);
                    return;
                }
                if (returns != null)
                {
                    var returnType = returns.LastOrDefault() as string;
                    returnType = returnType.Split('|').FirstOrDefault().Trim();
                    me.Type    = FindClass(returnType);
                    if (me.Type == null)
                    {
                        Console.WriteLine("Cannot resolve method return type: " + className + "." + name);
                        me.Type = ObjectClass;
                    }
                }

                ce.Members.Add(me);
                me2 = me;
            }
            if (me2 != null)
            {
                if (access.IsNullOrEmpty())
                {
                }
                else if (access == "protected")
                {
                    me2.IsProtected = true;
                }
                else if (access == "private")
                {
                    me2.IsPrivate = true;
                }
                else if (access == "public")
                {
                }
                else
                {
                }
                ImportDocumentation(me2, node);
            }
        }