//this is unneeded? /* * protected override void Initialize () * { * //TagDatabaseManager.Instance.FileUpdated += OnFinishedBuildingTree; * } * * public override void Dispose () * { * //TagDatabaseManager.Instance.FileUpdated -= OnFinishedBuildingTree; * } * * public static void CreatePadTree (object o) * { * CProject p = o as CProject; * if (o == null) return; * * //this happens in CDocumentParser.Parse * /*try { * foreach (ProjectFile f in p.Files) { * if (f.BuildAction == BuildAction.Compile) * TagDatabaseManager.Instance.UpdateFileTags (p, f.Name); * } * } catch (IOException) { * return; * } * }*/ public override void BuildChildNodes(ITreeBuilder builder, object dataObject) { CProject p = (CProject)dataObject; if (p == null) { return; } bool nestedNamespaces = builder.Options["NestedNamespaces"]; SymbolDatabaseMediator info = p.DB; /*// Namespaces * foreach (Namespace n in info.Namespaces.Values) { * if(n.Ours){ * if (nestedNamespaces) { * if (n.Parent == null) { * //if nested is enabled only add if top (Parent is null if the parentCursor is a translation unit) * builder.AddChild (n); * } * } else { * //else add every namespace * builder.AddChild (n); * } * } * } * * // Globals * builder.AddChild (info.GlobalDefinitions); * * // Macro Definitions * builder.AddChild (info.MacroDefinitions);*/ }
//CXCursor TUCursor; public TranslationUnitParser(SymbolDatabaseMediator db, string file, CancellationToken cancelToken, CXCursor TUcur) { this.db = db; this.file = file; token = cancelToken; //TUCursor = TUcur; }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; /*foreach (Macro m in info.Macros.Values) { * if(m.Ours) * treeBuilder.AddChild (m); * }*/ }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } bool publicOnly = treeBuilder.Options ["PublicApiOnly"]; SymbolDatabaseMediator info = p.DB; Struct thisStruct = (Struct)dataObject; /*foreach (Symbol s in info.CanBeInClasses.Values) * if (s.Ours && s.Parent != null && s.Parent.Equals (thisStruct) && (!publicOnly || s.Access == CX_CXXAccessSpecifier.@Public)) * treeBuilder.AddChild (s);*/ }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; Enumeration thisEnumeration = (Enumeration)dataObject; // Enumerators /*foreach (Enumerator e in info.Enumerators) * if (e. Ours && e.Parent != null && e.Parent.Equals (thisEnumeration)) * treeBuilder.AddChild (e);*/ }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; Namespace thisNamespace = ((Namespace)dataObject); // Namespaces /*if (treeBuilder.Options["NestedNamespaces"]) * foreach (Namespace n in info.Namespaces.Values) * if (n.Parent != null && n.Parent.Equals (thisNamespace)) * treeBuilder.AddChild (n); * * foreach(Symbol c in info.CanBeInNamespaces.Values) * if (c.Ours && c.Parent != null && c.Parent.Equals (thisNamespace)) * treeBuilder.AddChild (c);*/ }