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"); }
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); } } }
public override string GetNodeName(ITreeNavigator thisNode, object dataObject) { PackageNode node = dataObject as PackageNode; return(node.Name); }