Exemplo n.º 1
0
        public override void BuildNode(ITreeBuilder treeBuilder,
                                       object dataObject,
                                       ref string label,
                                       ref Gdk.Pixbuf icon,
                                       ref Gdk.Pixbuf closedIcon)
        {
            PackageNode packageNode = dataObject as PackageNode;

            label = packageNode.Name;
            icon  = Context.GetIcon("md-package");
        }
Exemplo n.º 2
0
        public override void BuildChildNodes(ITreeBuilder treeBuilder,
                                             object dataObject)
        {
            PackageNode          packageNode = dataObject as PackageNode;
            PythonParsedDocument parsed      = ProjectDomService.ParseFile(null, packageNode.ProjectFile.Name) as PythonParsedDocument;

            if (parsed != null && parsed.Module != null)
            {
                foreach (PythonClass pyClass in parsed.Module.Classes)
                {
                    treeBuilder.AddChild(pyClass);
                }
                foreach (PythonAttribute pyAttr in parsed.Module.Attributes)
                {
                    treeBuilder.AddChild(pyAttr);
                }
                foreach (PythonFunction pyFunc in parsed.Module.Functions)
                {
                    treeBuilder.AddChild(pyFunc);
                }
            }
        }
Exemplo n.º 3
0
        public override string GetNodeName(ITreeNavigator thisNode, object dataObject)
        {
            PackageNode node = dataObject as PackageNode;

            return(node.Name);
        }