コード例 #1
0
 public string GetFullPath(DataNode node)
 {
     return _model.GetFullPath(node);
 }
コード例 #2
0
        private static bool IsWantedChild(DataNode child)
        {
            try
            {

                // skip if static
                if (child.Text == "[static]")
                {
                    return false;
                }

                if (child.Parent != null)
                {
                    ValueNode parent = (child.Parent as ValueNode);
                    if (parent != null && parent.ClassPath != null)
                    {

                        // if is an array []
                        // skip [static] and "length" properties
                        if (parent.ClassPath == "Array")
                        {
                            if (child.Text == "[static]" || child.Text == "length")
                            {
                                return false;
                            }
                        }

                        // if is an AS3 display object,
                        // don't go upward (stage, parent)
                        if (parent.ClassPath.StartsWith("flash.display.") || parent.ClassPath == "Main")
                        {
                            if (Array.IndexOf(as3DisabledProps, child.Text) > -1)
                            {
                                return false;
                            }
                        }

                        // if is an AS2 display object,
                        // don't go upward (_parent)
                        if (parent.ClassPath == "MovieClip" || parent.ClassPath == "Video")
                        {
                            if (child.Text == "_parent")
                            {
                                return false;
                            }
                        }

                    }

                }

                // catch "cannot cast Aga.TreeNode to DataNode" 
                // TODO : fix this instead of just catching it
            }
            catch (Exception) { }
            return true;
        }
コード例 #3
0
 public DataNode AddNode(DataNode node)
 {
     _model.Root.Nodes.Add(node);
     return node;
 }
コード例 #4
0
        private static bool IsWantedParent(DataNode parent)
        {
            try
            {

                // if is an empty array []
                // then skip it from opening and closing { } the output
                if (parent.Nodes.Count == 1 || parent.Nodes.Count == 2)
                {
                    ValueNode pNode = parent as ValueNode;
                    if (pNode != null && pNode.ClassPath == "Array")
                    {
                        DataNode child1 = (DataNode)parent.Nodes[0];
                        if (child1.Text == "[static]" || child1.Text == "length")
                        {
                            return false;
                        }
                    }
                }

                // catch "cannot cast Aga.TreeNode to DataNode" 
                // TODO : fix this instead of just catching it
            }
            catch (Exception) { }
            return true;
        }