public class Valadoc.Api.Tree {
+ private Deque<Node> unbrowsable_documentation_dependencies = new LinkedList<Node>();
private ArrayList<Package> packages = new ArrayList<Package>();
private Package source_package = null;
private Settings settings;
return this.packages.read_only_view;
}
+ internal bool push_unbrowsable_documentation_dependency (Api.Node node) {
+ return unbrowsable_documentation_dependencies.offer_head (node);
+ }
+
private void add_dependencies_to_source_package () {
if ( this.source_package != null ) {
ArrayList<Package> deplst = new ArrayList<Package> ();
if (!add_package ("posix")) {
Vala.Report.error (null, "posix not found in specified Vala API directories");
}
- }
- else if (context.profile == Vala.Profile.GOBJECT) {
+ } else if (context.profile == Vala.Profile.GOBJECT) {
int glib_major = 2;
int glib_minor = 12;
// TODO Rename to process_comments
public void parse_comments (DocumentationParser docparser) {
- // TODO Move Wiki tree parse to Package
process_wiki (docparser);
foreach (Package pkg in this.packages) {
if (pkg.is_browsable (settings)) {
- pkg.process_comments(settings, docparser);
+ pkg.process_comments (settings, docparser);
}
}
+
+ // parse inherited non-public comments
+ while (!this.unbrowsable_documentation_dependencies.is_empty) {
+ var node = this.unbrowsable_documentation_dependencies.poll_head ();
+ node.process_comments (settings, docparser);
+ }
}
public void import_documentation (DocumentationImporter[] importers, string[] packages, string[] import_directories) {
_inherited = (Api.Node) ((Api.Struct) container).base_type.data_type;
}
+ if (_inherited != null) {
+ api_root.push_unbrowsable_documentation_dependency (_inherited);
+ }
+
// TODO report error if inherited is null
// TODO postpone check after complete parse of the api tree comments
}
public override ContentElement produce_content () {
- if (_inherited != null) {
+ if (_inherited != null && _inherited.documentation != null) {
Paragraph inherited_paragraph = _inherited.documentation.content.get (0) as Paragraph;
Run paragraph = new Run (Run.Style.NONE);