[valadoc] Api: Remove settings reference in nodes
- From: Florian Brosch <flobrosch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [valadoc] Api: Remove settings reference in nodes
- Date: Thu, 15 Oct 2009 21:04:20 +0000 (UTC)
commit 7197852b9f0a1fab700d72eaa1c83b3a6f79236d
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Wed Oct 14 14:31:51 2009 +0200
Api: Remove settings reference in nodes
src/doclets/devhelp/doclet/doclet.vala | 4 +-
src/doclets/htm/doclet/doclet.vala | 4 +-
src/doclets/htmlhelpers/doclet/doclet.vala | 2 +-
src/libvaladoc/apitree/apiitem.vala | 9 +-----
src/libvaladoc/apitree/apimembernode.vala | 8 +++---
src/libvaladoc/apitree/apinode.vala | 33 ++++++++++++-----------
src/libvaladoc/apitree/apinodebuilder.vala | 34 +++++++++++-------------
src/libvaladoc/apitree/apisymbolnode.vala | 28 ++++----------------
src/libvaladoc/apitree/apitree.vala | 17 +++++++++---
src/libvaladoc/apitree/apitypesymbolnode.vala | 8 +++---
src/libvaladoc/apitree/array.vala | 7 ++---
src/libvaladoc/apitree/class.vala | 7 +---
src/libvaladoc/apitree/constant.vala | 7 +---
src/libvaladoc/apitree/delegate.vala | 7 +---
src/libvaladoc/apitree/documentedelement.vala | 6 ++--
src/libvaladoc/apitree/enum.vala | 7 +---
src/libvaladoc/apitree/enumhandler.vala | 11 --------
src/libvaladoc/apitree/enumvalue.vala | 8 +++---
src/libvaladoc/apitree/errorcode.vala | 4 +-
src/libvaladoc/apitree/errordomain.vala | 7 +---
src/libvaladoc/apitree/field.vala | 7 +---
src/libvaladoc/apitree/formalparameter.vala | 4 +-
src/libvaladoc/apitree/interface.vala | 7 +---
src/libvaladoc/apitree/method.vala | 7 +---
src/libvaladoc/apitree/namespace.vala | 8 +++---
src/libvaladoc/apitree/namespacehandler.vala | 12 ++++----
src/libvaladoc/apitree/package.vala | 33 +++---------------------
src/libvaladoc/apitree/pointer.vala | 9 +++---
src/libvaladoc/apitree/property.vala | 11 +++-----
src/libvaladoc/apitree/propertyaccessor.vala | 4 +-
src/libvaladoc/apitree/returntypehandler.vala | 2 +-
src/libvaladoc/apitree/signal.vala | 7 +---
src/libvaladoc/apitree/struct.vala | 7 +---
src/libvaladoc/apitree/typeparameter.vala | 4 +-
src/libvaladoc/apitree/typereference.vala | 9 +++---
src/libvaladoc/apitree/visitable.vala | 6 ++--
36 files changed, 134 insertions(+), 221 deletions(-)
---
diff --git a/src/doclets/devhelp/doclet/doclet.vala b/src/doclets/devhelp/doclet/doclet.vala
index fa7f4e9..21c5eb3 100755
--- a/src/doclets/devhelp/doclet/doclet.vala
+++ b/src/doclets/devhelp/doclet/doclet.vala
@@ -27,13 +27,13 @@ using Gee;
namespace Valadoc.Devhelp {
public string? get_html_link ( Settings settings, Documentation element, Documentation? pos ) {
if ( element is Visitable ) {
- if ( ((Visitable)element).is_visitor_accessible () == false ) {
+ if ( ((Visitable)element).is_visitor_accessible (settings) == false ) {
return null;
}
}
if ( element is DocumentedElement ) {
- if ( ((DocumentedElement)element).package.is_visitor_accessible () == false ) {
+ if ( ((DocumentedElement)element).package.is_visitor_accessible (settings) == false ) {
return null;
}
}
diff --git a/src/doclets/htm/doclet/doclet.vala b/src/doclets/htm/doclet/doclet.vala
index d9f3762..4ff5cff 100755
--- a/src/doclets/htm/doclet/doclet.vala
+++ b/src/doclets/htm/doclet/doclet.vala
@@ -26,13 +26,13 @@ using Gee;
namespace Valadoc {
public string? get_html_link ( Settings settings, Documentation element, Documentation? pos ) {
if ( element is Visitable ) {
- if ( ((Visitable)element).is_visitor_accessible () == false ) {
+ if (! ((Visitable) element).is_visitor_accessible (settings)) {
return null;
}
}
if ( element is DocumentedElement ) {
- if ( ((DocumentedElement)element).package.is_visitor_accessible () == false ) {
+ if (! ((DocumentedElement) element).package.is_visitor_accessible (settings)) {
return null;
}
}
diff --git a/src/doclets/htmlhelpers/doclet/doclet.vala b/src/doclets/htmlhelpers/doclet/doclet.vala
index e571607..12d56b4 100755
--- a/src/doclets/htmlhelpers/doclet/doclet.vala
+++ b/src/doclets/htmlhelpers/doclet/doclet.vala
@@ -718,7 +718,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet {
public void write_navi_packages_inline ( GLib.FileStream file, Tree tree ) {
file.printf ( "<ul class=\"%s\">\n", css_navi );
foreach ( Package pkg in tree.get_package_list() ) {
- if ( pkg.is_visitor_accessible ( ) ) {
+ if (pkg.is_visitor_accessible (settings)) {
file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a>\n", get_html_inline_navigation_link_css_class (pkg), css_navi_link, this.get_link(pkg, null), pkg.name );
// brief description
file.puts ( "</li>\n" );
diff --git a/src/libvaladoc/apitree/apiitem.vala b/src/libvaladoc/apitree/apiitem.vala
index 27a4890..c312f97 100644
--- a/src/libvaladoc/apitree/apiitem.vala
+++ b/src/libvaladoc/apitree/apiitem.vala
@@ -24,12 +24,7 @@ using Gee;
using Valadoc.Content;
public abstract class Valadoc.Api.Item : Object {
- public Valadoc.Settings settings {
- protected get;
- set;
- }
-
- public Basic parent {
+ public Api.Item parent {
protected set;
get;
}
@@ -37,6 +32,6 @@ public abstract class Valadoc.Api.Item : Object {
protected virtual void resolve_type_references (Tree root) {
}
- protected virtual void parse_comments (DocumentationParser parser) {
+ protected virtual void process_comments (Settings settings, DocumentationParser parser) {
}
}
diff --git a/src/libvaladoc/apitree/apimembernode.vala b/src/libvaladoc/apitree/apimembernode.vala
index ea5b201..f836b17 100644
--- a/src/libvaladoc/apitree/apimembernode.vala
+++ b/src/libvaladoc/apitree/apimembernode.vala
@@ -26,16 +26,16 @@ using Gee;
public abstract class Valadoc.Api.MemberNode : Api.SymbolNode {
- public MemberNode (Settings settings, Vala.Member symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public MemberNode (Vala.Member symbol, Api.Node parent) {
+ base (symbol, parent);
}
- protected override void parse_comments (DocumentationParser parser) {
+ protected override void process_comments (Settings settings, DocumentationParser parser) {
var source_comment = ((Vala.Member) symbol).comment;
if (source_comment != null) {
documentation = parser.parse (this, source_comment);
}
- base.parse_comments (parser);
+ base.process_comments (settings, parser);
}
}
diff --git a/src/libvaladoc/apitree/apinode.vala b/src/libvaladoc/apitree/apinode.vala
index 94af777..5037502 100644
--- a/src/libvaladoc/apitree/apinode.vala
+++ b/src/libvaladoc/apitree/apinode.vala
@@ -48,6 +48,7 @@ public enum Valadoc.Api.NodeType {
// TODO Drop DocumentedElement
public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitable {
+ private bool do_document = false;
// TODO Drop DocumentElement
/* public abstract string? name { owned get; } */
@@ -58,8 +59,7 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
private Map<Symbol,Node> per_symbol_children;
private Map<NodeType?,Gee.List<Node>> per_type_children;
- public Node (Settings settings, Api.Node? parent) {
- this.settings = settings;
+ public Node (Api.Node? parent) {
this.parent = parent;
per_name_children = new HashMap<string,Node> ();
@@ -69,9 +69,7 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
public abstract void accept (Doclet doclet);
- protected abstract bool is_type_visitor_accessible (Valadoc.Basic element);
-
- public abstract bool is_visitor_accessible ();
+ public abstract bool is_visitor_accessible (Settings settings);
public override string? get_filename () {
return null;
@@ -102,24 +100,25 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
}
}
- protected override void parse_comments (DocumentationParser parser) {
- // TODO check is visitable to avoid unuseful processing
+ protected override void process_comments (Settings settings, DocumentationParser parser) {
+ do_document = true;
- foreach (Node node in per_name_children.values) {
- node.parse_comments (parser);
+ foreach (Node node in per_symbol_children.values) {
+ if (node.is_visitor_accessible (settings)) {
+ node.process_comments (settings, parser);
+ }
}
}
- public Gee.List<Node> get_children_by_type (NodeType type) {
+ public Gee.List<Node> get_children_by_type (NodeType type, bool filtered = true) {
var children = new ArrayList<Node> ();
Gee.List<Node> all_children = per_type_children.get (type);
if (all_children != null) {
- foreach (Node child in all_children) {
- if (!child.is_type_visitor_accessible (this))
- continue ;
-
- children.add (child);
+ foreach (Node node in all_children) {
+ if (node.do_document || !filtered) {
+ children.add (node);
+ }
}
}
@@ -130,7 +129,9 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
Gee.List<Node> all_children = per_type_children.get (type);
if (all_children != null) {
foreach (Node node in all_children) {
- node.accept (doclet);
+ if (node.do_document) {
+ node.accept (doclet);
+ }
}
}
}
diff --git a/src/libvaladoc/apitree/apinodebuilder.vala b/src/libvaladoc/apitree/apinodebuilder.vala
index 75e9791..24d410d 100644
--- a/src/libvaladoc/apitree/apinodebuilder.vala
+++ b/src/libvaladoc/apitree/apinodebuilder.vala
@@ -25,13 +25,11 @@ using Vala;
using Gee;
internal class Valadoc.Api.NodeBuilder : CodeVisitor {
- private Settings settings;
private Tree root;
private Gee.Collection<Package> packages;
private Node current_node;
- internal NodeBuilder (Settings settings, Tree root) {
- this.settings = settings;
+ internal NodeBuilder (Tree root) {
this.root = root;
packages = root.get_package_list ();
current_node = null;
@@ -70,7 +68,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_class (Vala.Class element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Class (settings, element, parent);
+ SymbolNode node = new Class (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -79,7 +77,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_interface (Vala.Interface element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Interface (settings, element, parent);
+ SymbolNode node = new Interface (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -88,7 +86,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_struct (Vala.Struct element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Struct (settings, element, parent);
+ SymbolNode node = new Struct (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -97,7 +95,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_field (Vala.Field element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Field (settings, element, parent);
+ SymbolNode node = new Field (element, parent);
parent.add_child (node);
// Process field type
@@ -108,7 +106,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_property (Vala.Property element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Property (settings, element, parent);
+ SymbolNode node = new Property (element, parent);
parent.add_child (node);
// Process property type
@@ -119,7 +117,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_method (Vala.Method element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Method (settings, element, parent);
+ SymbolNode node = new Method (element, parent);
parent.add_child (node);
// Process error types
@@ -131,7 +129,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_signal (Vala.Signal element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Signal (settings, element, parent);
+ SymbolNode node = new Signal (element, parent);
parent.add_child (node);
// Process return type
@@ -142,7 +140,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_delegate (Vala.Delegate element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Delegate (settings, element, parent);
+ SymbolNode node = new Delegate (element, parent);
parent.add_child (node);
// Process error types
@@ -154,7 +152,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_enum (Vala.Enum element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Enum (settings, element, parent);
+ SymbolNode node = new Enum (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -163,7 +161,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_enum_value (Vala.EnumValue element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new EnumValue (settings, element, parent);
+ SymbolNode node = new EnumValue (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -172,7 +170,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_constant (Vala.Constant element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new Constant (settings, element, parent);
+ SymbolNode node = new Constant (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -181,7 +179,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_error_domain (Vala.ErrorDomain element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new ErrorDomain (settings, element, parent);
+ SymbolNode node = new ErrorDomain (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -190,7 +188,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_error_code (Vala.ErrorCode element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new ErrorCode (settings, element, parent);
+ SymbolNode node = new ErrorCode (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -199,7 +197,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_type_parameter (Vala.TypeParameter element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new TypeParameter (settings, element, parent);
+ SymbolNode node = new TypeParameter (element, parent);
parent.add_child (node);
process_children (node, element);
@@ -208,7 +206,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
public override void visit_formal_parameter (Vala.FormalParameter element) {
Node parent = get_parent_node_for (element);
- SymbolNode node = new FormalParameter (settings, element, parent);
+ SymbolNode node = new FormalParameter (element, parent);
parent.add_child (node);
process_children (node, element);
diff --git a/src/libvaladoc/apitree/apisymbolnode.vala b/src/libvaladoc/apitree/apisymbolnode.vala
index d46aa55..de1e314 100644
--- a/src/libvaladoc/apitree/apisymbolnode.vala
+++ b/src/libvaladoc/apitree/apisymbolnode.vala
@@ -36,8 +36,8 @@ public abstract class Valadoc.Api.SymbolNode : Api.Node, SymbolAccessibility {
}
}
- public SymbolNode (Settings settings, Vala.Symbol symbol, Api.Node parent) {
- base (settings, parent);
+ public SymbolNode (Vala.Symbol symbol, Api.Node parent) {
+ base (parent);
this.symbol = symbol;
}
@@ -54,30 +54,14 @@ public abstract class Valadoc.Api.SymbolNode : Api.Node, SymbolAccessibility {
return GLib.Path.get_basename ( path );
}
- protected override bool is_type_visitor_accessible (Valadoc.Basic element) {
- if (!this.settings._private && is_private)
+ public override bool is_visitor_accessible (Settings settings) {
+ if (!settings._private && this.is_private)
return false;
- if (!this.settings._internal && is_internal)
+ if (!settings._internal && this.is_internal)
return false;
- if (!this.settings._protected && is_protected)
- return false;
-
- if (this.parent != element && !this.settings.add_inherited)
- return false;
-
- return true;
- }
-
- public override bool is_visitor_accessible () {
- if (!this.settings._private && this.is_private)
- return false;
-
- if (!this.settings._internal && this.is_internal)
- return false;
-
- if (!this.settings._protected && this.is_protected)
+ if (!settings._protected && this.is_protected)
return false;
return true;
diff --git a/src/libvaladoc/apitree/apitree.vala b/src/libvaladoc/apitree/apitree.vala
index ed7fe4d..6f929d9 100644
--- a/src/libvaladoc/apitree/apitree.vala
+++ b/src/libvaladoc/apitree/apitree.vala
@@ -186,7 +186,7 @@ public class Valadoc.Tree {
var vfile = new SourceFile (context, package_path, true);
context.add_source_file (vfile);
- Package vdpkg = new Package (this.settings, vfile, true);
+ Package vdpkg = new Package (vfile, pkg, true);
this.packages.add (vdpkg);
var deps_filename = Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg));
@@ -233,7 +233,7 @@ public class Valadoc.Tree {
if (this.sourcefiles == null) {
- this.sourcefiles = new Package (this.settings, source_file, false);
+ this.sourcefiles = new Package (source_file, settings.pkg_name, false);
this.packages.add (this.sourcefiles);
}
else {
@@ -254,8 +254,11 @@ public class Valadoc.Tree {
context.add_source_file (source_file);
} else if (source.has_suffix (".vapi")) {
+ string file_name = GLib.Path.get_basename (source);
+ file_name = file_name.ndup ( file_name.size() - ".vapi".size() );
+
var vfile = new SourceFile (context, rpath, true);
- Package vdpkg = new Package (this.settings, vfile);
+ Package vdpkg = new Package (vfile, file_name);
context.add_source_file (vfile);
this.packages.add (vdpkg);
} else if (source.has_suffix (".c")) {
@@ -297,7 +300,7 @@ public class Valadoc.Tree {
}
}
- Api.NodeBuilder builder = new Api.NodeBuilder (settings, this);
+ Api.NodeBuilder builder = new Api.NodeBuilder (this);
this.context.accept(builder);
this.resolve_type_references ();
this.add_dependencies_to_source_package ();
@@ -318,12 +321,16 @@ public class Valadoc.Tree {
}
}
+ // TODO Rename to process_comments
public void parse_comments (DocumentationParser docparser) {
+ // TODO Move Wiki tree parse to Package
this.wikitree = new WikiPageTree(this.reporter, this.settings);
wikitree.create_tree (docparser);
foreach (Package pkg in this.packages) {
- pkg.parse_comments(docparser);
+ if (pkg.is_visitor_accessible (settings)) {
+ pkg.process_comments(settings, docparser);
+ }
}
}
diff --git a/src/libvaladoc/apitree/apitypesymbolnode.vala b/src/libvaladoc/apitree/apitypesymbolnode.vala
index cfb74c7..5d0b082 100644
--- a/src/libvaladoc/apitree/apitypesymbolnode.vala
+++ b/src/libvaladoc/apitree/apitypesymbolnode.vala
@@ -26,16 +26,16 @@ using Gee;
public abstract class Valadoc.Api.TypeSymbolNode : Api.SymbolNode {
- public TypeSymbolNode (Settings settings, Vala.TypeSymbol symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public TypeSymbolNode (Vala.TypeSymbol symbol, Api.Node parent) {
+ base (symbol, parent);
}
- protected override void parse_comments (DocumentationParser parser) {
+ protected override void process_comments (Settings settings, DocumentationParser parser) {
var source_comment = ((Vala.TypeSymbol) symbol).comment;
if (source_comment != null) {
documentation = parser.parse (this, source_comment);
}
- base.parse_comments (parser);
+ base.process_comments (settings, parser);
}
}
diff --git a/src/libvaladoc/apitree/array.vala b/src/libvaladoc/apitree/array.vala
index 1ef8ba5..f0f1b8b 100644
--- a/src/libvaladoc/apitree/array.vala
+++ b/src/libvaladoc/apitree/array.vala
@@ -31,16 +31,15 @@ public class Valadoc.Array : Basic {
get;
}
- public Array (Valadoc.Settings settings, Vala.ArrayType vtyperef, Basic parent) {
- this.settings = settings;
+ public Array (Vala.ArrayType vtyperef, Api.Item parent) {
this.vtype = vtyperef;
this.parent = parent;
Vala.DataType vntype = vtyperef.element_type;
if ( vntype is Vala.ArrayType )
- this.data_type = new Array (settings, (Vala.ArrayType)vntype, this);
+ this.data_type = new Array ((Vala.ArrayType) vntype, this);
else
- this.data_type = new TypeReference (settings, vntype, this);
+ this.data_type = new TypeReference (vntype, this);
}
public void write (Langlet langlet, void* ptr, DocumentedElement parent) {
diff --git a/src/libvaladoc/apitree/class.vala b/src/libvaladoc/apitree/class.vala
index 62dd708..5566a78 100644
--- a/src/libvaladoc/apitree/class.vala
+++ b/src/libvaladoc/apitree/class.vala
@@ -27,8 +27,8 @@ public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, Si
private Gee.ArrayList<Interface> interfaces;
private Vala.Class vclass;
- public Class (Valadoc.Settings settings, Vala.Class symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Class (Vala.Class symbol, Api.Node parent) {
+ base (symbol, parent);
this.interfaces = new Gee.ArrayList<Interface>();
this.vclass = symbol;
@@ -68,9 +68,6 @@ public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, Si
}
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_class ( this );
}
diff --git a/src/libvaladoc/apitree/constant.vala b/src/libvaladoc/apitree/constant.vala
index 90e0b33..2afadb3 100644
--- a/src/libvaladoc/apitree/constant.vala
+++ b/src/libvaladoc/apitree/constant.vala
@@ -35,8 +35,8 @@ public class Valadoc.Constant : Api.MemberNode, ReturnTypeHandler {
return ( this.vconst == vconst );
}
- public Constant (Valadoc.Settings settings, Vala.Constant symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Constant (Vala.Constant symbol, Api.Node parent) {
+ base (symbol, parent);
this.vconst = symbol;
var vret = this.vconst.type_reference;
@@ -52,9 +52,6 @@ public class Valadoc.Constant : Api.MemberNode, ReturnTypeHandler {
}
public void visit ( Doclet doclet, ConstantHandler? parent ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_constant ( this, parent );
}
diff --git a/src/libvaladoc/apitree/delegate.vala b/src/libvaladoc/apitree/delegate.vala
index a1fdd4b..6c929d9 100644
--- a/src/libvaladoc/apitree/delegate.vala
+++ b/src/libvaladoc/apitree/delegate.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Delegate : Api.TypeSymbolNode, ParameterListHandler, ReturnTypeHandler, TemplateParameterListHandler, ExceptionHandler {
private Vala.Delegate vdelegate;
- public Delegate (Valadoc.Settings settings, Vala.Delegate symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Delegate (Vala.Delegate symbol, Api.Node parent) {
+ base (symbol, parent);
this.vdelegate = symbol;
@@ -45,9 +45,6 @@ public class Valadoc.Delegate : Api.TypeSymbolNode, ParameterListHandler, Return
}
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_delegate ( this );
}
diff --git a/src/libvaladoc/apitree/documentedelement.vala b/src/libvaladoc/apitree/documentedelement.vala
index 20f34e6..01a52dd 100644
--- a/src/libvaladoc/apitree/documentedelement.vala
+++ b/src/libvaladoc/apitree/documentedelement.vala
@@ -34,7 +34,7 @@ public abstract class Valadoc.DocumentedElement : Basic, Documentation {
public Namespace? nspace {
get {
if (this._nspace == null) {
- Valadoc.Basic ast = this;
+ Api.Item ast = this;
while (ast is Valadoc.Namespace == false) {
ast = ast.parent;
if (ast == null)
@@ -50,7 +50,7 @@ public abstract class Valadoc.DocumentedElement : Basic, Documentation {
public Package? package {
get {
if (this._package == null) {
- Valadoc.Basic ast = this;
+ Api.Item ast = this;
while (ast is Valadoc.Package == false) {
ast = ast.parent;
if (ast == null)
@@ -87,7 +87,7 @@ public abstract class Valadoc.DocumentedElement : Basic, Documentation {
GLib.StringBuilder full_name = new GLib.StringBuilder (this.name);
if (this.parent != null) {
- for (Basic pos = this.parent; pos is Package == false ; pos = pos.parent) {
+ for (Api.Item pos = this.parent; pos is Package == false ; pos = pos.parent) {
string name = ((DocumentedElement)pos).name;
if (name != null) {
full_name.prepend_unichar ('.');
diff --git a/src/libvaladoc/apitree/enum.vala b/src/libvaladoc/apitree/enum.vala
index 33ef053..6453c0b 100644
--- a/src/libvaladoc/apitree/enum.vala
+++ b/src/libvaladoc/apitree/enum.vala
@@ -24,8 +24,8 @@ using Gee;
public class Valadoc.Enum : Api.TypeSymbolNode, MethodHandler {
- public Enum (Valadoc.Settings settings, Vala.Enum symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Enum (Vala.Enum symbol, Api.Node parent) {
+ base (symbol, parent);
this.venum = symbol;
}
@@ -43,9 +43,6 @@ public class Valadoc.Enum : Api.TypeSymbolNode, MethodHandler {
}
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_enum ( this );
}
diff --git a/src/libvaladoc/apitree/enumhandler.vala b/src/libvaladoc/apitree/enumhandler.vala
index 48f9501..af8c9da 100644
--- a/src/libvaladoc/apitree/enumhandler.vala
+++ b/src/libvaladoc/apitree/enumhandler.vala
@@ -29,15 +29,4 @@ public interface Valadoc.EnumHandler : Api.Node {
public void visit_enums ( Doclet doclet ) {
accept_children_by_type (Api.NodeType.ENUM, doclet);
}
-
- public void add_enums ( Gee.Collection<Vala.Enum> venums ) {
- foreach ( Vala.Enum venum in venums ) {
- this.add_enum ( venum );
- }
- }
-
- public void add_enum ( Vala.Enum venum ) {
- Enum tmp = new Enum (this.settings, venum, this);
- add_child (tmp);
- }
}
diff --git a/src/libvaladoc/apitree/enumvalue.vala b/src/libvaladoc/apitree/enumvalue.vala
index 3a440ee..209698e 100644
--- a/src/libvaladoc/apitree/enumvalue.vala
+++ b/src/libvaladoc/apitree/enumvalue.vala
@@ -26,18 +26,18 @@ using Gee;
public class Valadoc.EnumValue: Api.SymbolNode {
private Vala.EnumValue venval;
- public EnumValue (Valadoc.Settings settings, Vala.EnumValue symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public EnumValue (Vala.EnumValue symbol, Api.Node parent) {
+ base (symbol, parent);
this.venval = symbol;
}
- protected override void parse_comments (DocumentationParser parser) {
+ protected override void process_comments (Settings settings, DocumentationParser parser) {
var source_comment = ((Vala.EnumValue) symbol).comment;
if (source_comment != null) {
documentation = parser.parse (this, source_comment);
}
- base.parse_comments (parser);
+ base.process_comments (settings, parser);
}
public string get_cname () {
diff --git a/src/libvaladoc/apitree/errorcode.vala b/src/libvaladoc/apitree/errorcode.vala
index a493cf6..b147dba 100644
--- a/src/libvaladoc/apitree/errorcode.vala
+++ b/src/libvaladoc/apitree/errorcode.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.ErrorCode : Api.TypeSymbolNode {
private Vala.ErrorCode verrcode;
- public ErrorCode (Valadoc.Settings settings, Vala.ErrorCode symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public ErrorCode (Vala.ErrorCode symbol, Api.Node parent) {
+ base (symbol, parent);
this.verrcode = symbol;
}
diff --git a/src/libvaladoc/apitree/errordomain.vala b/src/libvaladoc/apitree/errordomain.vala
index 920a793..38ae952 100644
--- a/src/libvaladoc/apitree/errordomain.vala
+++ b/src/libvaladoc/apitree/errordomain.vala
@@ -24,8 +24,8 @@ using Gee;
public class Valadoc.ErrorDomain : Api.TypeSymbolNode, MethodHandler {
private Vala.ErrorDomain verrdom;
- public ErrorDomain (Valadoc.Settings settings, Vala.ErrorDomain symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public ErrorDomain (Vala.ErrorDomain symbol, Api.Node parent) {
+ base (symbol, parent);
this.verrdom = symbol;
}
@@ -42,9 +42,6 @@ public class Valadoc.ErrorDomain : Api.TypeSymbolNode, MethodHandler {
}
public void visit (Doclet doclet) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_error_domain ( this );
}
diff --git a/src/libvaladoc/apitree/field.vala b/src/libvaladoc/apitree/field.vala
index df97a50..389416b 100644
--- a/src/libvaladoc/apitree/field.vala
+++ b/src/libvaladoc/apitree/field.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Field : Api.MemberNode, ReturnTypeHandler {
private Vala.Field vfield;
- public Field (Valadoc.Settings settings, Vala.Field symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Field (Vala.Field symbol, Api.Node parent) {
+ base (symbol, parent);
this.vfield = symbol;
var vret = this.vfield.field_type;
@@ -65,9 +65,6 @@ public class Valadoc.Field : Api.MemberNode, ReturnTypeHandler {
}
public void visit ( Doclet doclet, FieldHandler? parent ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_field ( this, parent );
}
diff --git a/src/libvaladoc/apitree/formalparameter.vala b/src/libvaladoc/apitree/formalparameter.vala
index 3239e45..77c3885 100644
--- a/src/libvaladoc/apitree/formalparameter.vala
+++ b/src/libvaladoc/apitree/formalparameter.vala
@@ -24,8 +24,8 @@ using Gee;
public class Valadoc.FormalParameter : Api.SymbolNode, ReturnTypeHandler {
private Vala.FormalParameter vformalparam;
- public FormalParameter (Valadoc.Settings settings, Vala.FormalParameter symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public FormalParameter (Vala.FormalParameter symbol, Api.Node parent) {
+ base (symbol, parent);
this.vformalparam = symbol;
var vformparam = this.vformalparam.parameter_type;
diff --git a/src/libvaladoc/apitree/interface.vala b/src/libvaladoc/apitree/interface.vala
index 2ad85ca..8ea3fd6 100644
--- a/src/libvaladoc/apitree/interface.vala
+++ b/src/libvaladoc/apitree/interface.vala
@@ -24,8 +24,8 @@ using Gee;
public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler, MethodHandler, DelegateHandler, EnumHandler, StructHandler, ClassHandler {
- public Interface (Valadoc.Settings settings, Vala.Interface symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Interface (Vala.Interface symbol, Api.Node parent) {
+ base (symbol, parent);
this.vinterface = symbol;
}
@@ -47,9 +47,6 @@ public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHand
private Vala.Interface vinterface;
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_interface ( this );
}
diff --git a/src/libvaladoc/apitree/method.vala b/src/libvaladoc/apitree/method.vala
index 9b511de..0b28b7e 100644
--- a/src/libvaladoc/apitree/method.vala
+++ b/src/libvaladoc/apitree/method.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler, ReturnTypeHandler {
private Vala.Method vmethod;
- public Method (Valadoc.Settings settings, Vala.Method symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Method (Vala.Method symbol, Api.Node parent) {
+ base (symbol, parent);
this.vmethod = symbol;
var vret = this.vmethod.return_type;
@@ -130,9 +130,6 @@ public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHan
}
public void visit ( Doclet doclet, Valadoc.MethodHandler in_type ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_method ( this, in_type );
}
diff --git a/src/libvaladoc/apitree/namespace.vala b/src/libvaladoc/apitree/namespace.vala
index 8546da2..1cb9119 100644
--- a/src/libvaladoc/apitree/namespace.vala
+++ b/src/libvaladoc/apitree/namespace.vala
@@ -29,8 +29,8 @@ public class Valadoc.Namespace : Api.SymbolNode, MethodHandler, FieldHandler, Na
{
private Comment source_comment;
- public Namespace (Valadoc.Settings settings, Vala.Namespace symbol, NamespaceHandler parent) {
- base (settings, symbol, parent);
+ public Namespace (Vala.Namespace symbol, NamespaceHandler parent) {
+ base (symbol, parent);
this.vnspace = symbol;
@@ -44,12 +44,12 @@ public class Valadoc.Namespace : Api.SymbolNode, MethodHandler, FieldHandler, Na
}
}
- protected override void parse_comments (DocumentationParser parser) {
+ protected override void process_comments (Settings settings, DocumentationParser parser) {
if (source_comment != null) {
documentation = parser.parse (this, source_comment);
}
- base.parse_comments (parser);
+ base.process_comments (settings, parser);
}
public void visit (Doclet doclet) {
diff --git a/src/libvaladoc/apitree/namespacehandler.vala b/src/libvaladoc/apitree/namespacehandler.vala
index 8f8ba69..bc5cc93 100644
--- a/src/libvaladoc/apitree/namespacehandler.vala
+++ b/src/libvaladoc/apitree/namespacehandler.vala
@@ -22,8 +22,8 @@ using GLib;
using Gee;
public interface Valadoc.NamespaceHandler : Api.Node {
- public Gee.Collection<Namespace> get_namespace_list () {
- return get_children_by_type (Api.NodeType.NAMESPACE);
+ public Gee.Collection<Namespace> get_namespace_list (bool filtered = true) {
+ return get_children_by_type (Api.NodeType.NAMESPACE, filtered);
}
public void visit_namespaces ( Doclet doclet ) {
@@ -47,7 +47,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
Namespace ns = this.find_namespace_without_childs ( vns );
if ( ns == null ) {
- ns = new Namespace (this.settings, vns, this);
+ ns = new Namespace (vns, this);
add_child ( ns );
}
@@ -74,7 +74,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
return this.get_namespace_helper ( node, vnspaces, 1 );
}
else {
- var ns = new Namespace (this.settings, vnspace, this);
+ var ns = new Namespace (vnspace, this);
add_child ( ns );
return ns;
}
@@ -85,7 +85,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
if ( vns == null )
return null;
- foreach ( Namespace ns in get_namespace_list () ) {
+ foreach ( Namespace ns in get_namespace_list (false) ) {
if ( !ns.is_vnspace( vns ) )
continue ;
@@ -101,7 +101,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
internal Namespace find_namespace_without_childs ( Vala.Namespace vns ) {
Namespace ns2 = null;
- foreach ( Namespace ns in get_namespace_list () ) {
+ foreach ( Namespace ns in get_namespace_list (false) ) {
if ( ns.is_vnspace(vns) )
ns2 = ns;
}
diff --git a/src/libvaladoc/apitree/package.vala b/src/libvaladoc/apitree/package.vala
index 0b99a3c..cbcf76a 100644
--- a/src/libvaladoc/apitree/package.vala
+++ b/src/libvaladoc/apitree/package.vala
@@ -71,22 +71,8 @@ public class Valadoc.Package : Api.Node, NamespaceHandler {
return this._dependencies.read_only_view;
}
- private static string extract_package_name ( Settings settings, Vala.SourceFile vfile ) {
- if ( vfile.filename.has_suffix (".vapi") ) {
- string file_name = GLib.Path.get_basename (vfile.filename);
- return file_name.ndup ( file_name.size() - ".vapi".size() );
- }
- else if ( vfile.filename.has_suffix (".gidl") ) {
- string file_name = GLib.Path.get_basename (vfile.filename);
- return file_name.ndup ( file_name.size() - ".gidl".size() );
- }
- else {
- return settings.pkg_name;
- }
- }
-
- public Package.with_name (Valadoc.Settings settings, Vala.SourceFile vfile, string name, bool is_package = false) {
- base (settings, null);
+ public Package (Vala.SourceFile vfile, string name, bool is_package = false) {
+ base (null);
this.is_package = is_package;
this.package_name = name;
@@ -95,10 +81,6 @@ public class Valadoc.Package : Api.Node, NamespaceHandler {
this.parent = null;
}
- public Package (Valadoc.Settings settings, Vala.SourceFile vfile, bool is_package = false) {
- this.with_name (settings, vfile, this.extract_package_name (settings, vfile), is_package);
- }
-
private string package_name;
public override string? name {
@@ -116,18 +98,11 @@ public class Valadoc.Package : Api.Node, NamespaceHandler {
return this.vfiles.contains (source_file);
}
- protected override bool is_type_visitor_accessible (Valadoc.Basic element) {
- return true;
- }
-
- public override bool is_visitor_accessible () {
- return !( this.is_package && this.settings.with_deps == false );
+ public override bool is_visitor_accessible (Settings settings) {
+ return !( this.is_package && settings.with_deps == false );
}
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible () ) {
- return ;
- }
doclet.visit_package ( this );
}
diff --git a/src/libvaladoc/apitree/pointer.vala b/src/libvaladoc/apitree/pointer.vala
index be693b7..aac5e7d 100644
--- a/src/libvaladoc/apitree/pointer.vala
+++ b/src/libvaladoc/apitree/pointer.vala
@@ -32,18 +32,17 @@ public class Valadoc.Pointer : Basic {
get;
}
- public Pointer (Valadoc.Settings settings, Vala.PointerType vtyperef, Basic parent) {
- this.settings = settings;
+ public Pointer (Vala.PointerType vtyperef, Api.Item parent) {
this.vtype = vtyperef;
this.parent = parent;
Vala.DataType vntype = vtype.base_type;
if (vntype is Vala.PointerType)
- this.data_type = new Pointer (settings, (Vala.PointerType) vntype, this);
+ this.data_type = new Pointer ((Vala.PointerType) vntype, this);
else if (vntype is Vala.ArrayType)
- this.data_type = new Array (settings, (Vala.ArrayType) vntype, this);
+ this.data_type = new Array ((Vala.ArrayType) vntype, this);
else
- this.data_type = new TypeReference (settings, vntype, this);
+ this.data_type = new TypeReference (vntype, this);
}
public void write (Langlet langlet, void* ptr, DocumentedElement parent) {
diff --git a/src/libvaladoc/apitree/property.vala b/src/libvaladoc/apitree/property.vala
index 8ba2768..6f7fe90 100644
--- a/src/libvaladoc/apitree/property.vala
+++ b/src/libvaladoc/apitree/property.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
private Vala.Property vproperty;
- public Property (Valadoc.Settings settings, Vala.Property symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Property (Vala.Property symbol, Api.Node parent) {
+ base (symbol, parent);
this.vproperty = symbol;
@@ -35,11 +35,11 @@ public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
this.set_ret_type (ret);
if (this.vproperty.get_accessor != null) {
- this.getter = new PropertyAccessor (this.settings, this.vproperty.get_accessor, this);
+ this.getter = new PropertyAccessor (this.vproperty.get_accessor, this);
}
if (this.vproperty.set_accessor != null) {
- this.setter = new PropertyAccessor (this.settings, this.vproperty.set_accessor, this);
+ this.setter = new PropertyAccessor (this.vproperty.set_accessor, this);
}
}
@@ -111,9 +111,6 @@ public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
}
public void visit (Doclet doclet) {
- if (!this.is_visitor_accessible ())
- return ;
-
doclet.visit_property (this);
}
diff --git a/src/libvaladoc/apitree/propertyaccessor.vala b/src/libvaladoc/apitree/propertyaccessor.vala
index 49b23b6..67910b8 100644
--- a/src/libvaladoc/apitree/propertyaccessor.vala
+++ b/src/libvaladoc/apitree/propertyaccessor.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.PropertyAccessor : Api.SymbolNode {
private Vala.PropertyAccessor vpropacc;
- public PropertyAccessor (Valadoc.Settings settings, Vala.PropertyAccessor symbol, Property parent) {
- base (settings, symbol, parent);
+ public PropertyAccessor (Vala.PropertyAccessor symbol, Property parent) {
+ base (symbol, parent);
this.vpropacc = symbol;
}
diff --git a/src/libvaladoc/apitree/returntypehandler.vala b/src/libvaladoc/apitree/returntypehandler.vala
index 5f15723..c9887e9 100644
--- a/src/libvaladoc/apitree/returntypehandler.vala
+++ b/src/libvaladoc/apitree/returntypehandler.vala
@@ -36,7 +36,7 @@ public interface Valadoc.ReturnTypeHandler : Basic {
// rename
internal void set_ret_type ( Vala.DataType? vtref ) {
- var tmp = new TypeReference (this.settings, vtref, this);
+ var tmp = new TypeReference (vtref, this);
this.type_reference = tmp;
}
}
diff --git a/src/libvaladoc/apitree/signal.vala b/src/libvaladoc/apitree/signal.vala
index ba3b73b..922eaaf 100644
--- a/src/libvaladoc/apitree/signal.vala
+++ b/src/libvaladoc/apitree/signal.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Signal : Api.MemberNode, ParameterListHandler, ReturnTypeHandler {
private Vala.Signal vsignal;
- public Signal (Valadoc.Settings settings, Vala.Signal symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Signal (Vala.Signal symbol, Api.Node parent) {
+ base (symbol, parent);
this.vsignal = symbol;
@@ -57,9 +57,6 @@ public class Valadoc.Signal : Api.MemberNode, ParameterListHandler, ReturnTypeHa
}
public void visit (Doclet doclet) {
- if ( !this.is_visitor_accessible () )
- return ;
-
doclet.visit_signal (this);
}
diff --git a/src/libvaladoc/apitree/struct.vala b/src/libvaladoc/apitree/struct.vala
index 786460c..fb24229 100644
--- a/src/libvaladoc/apitree/struct.vala
+++ b/src/libvaladoc/apitree/struct.vala
@@ -26,8 +26,8 @@ using Gee;
public class Valadoc.Struct : Api.TypeSymbolNode, MethodHandler, ConstructionMethodHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler {
private Vala.Struct vstruct;
- public Struct (Valadoc.Settings settings, Vala.Struct symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public Struct (Vala.Struct symbol, Api.Node parent) {
+ base (symbol, parent);
this.vstruct = symbol;
}
@@ -41,9 +41,6 @@ public class Valadoc.Struct : Api.TypeSymbolNode, MethodHandler, ConstructionMet
}
public void visit ( Doclet doclet ) {
- if ( !this.is_visitor_accessible ( ) )
- return ;
-
doclet.visit_struct (this);
}
diff --git a/src/libvaladoc/apitree/typeparameter.vala b/src/libvaladoc/apitree/typeparameter.vala
index 607a384..22e9d05 100644
--- a/src/libvaladoc/apitree/typeparameter.vala
+++ b/src/libvaladoc/apitree/typeparameter.vala
@@ -25,8 +25,8 @@ using Gee;
public class Valadoc.TypeParameter : Api.SymbolNode, ReturnTypeHandler {
- public TypeParameter (Valadoc.Settings settings, Vala.TypeParameter symbol, Api.Node parent) {
- base (settings, symbol, parent);
+ public TypeParameter (Vala.TypeParameter symbol, Api.Node parent) {
+ base (symbol, parent);
}
public TypeReference? type_reference {
diff --git a/src/libvaladoc/apitree/typereference.vala b/src/libvaladoc/apitree/typereference.vala
index 86e1a98..1360930 100644
--- a/src/libvaladoc/apitree/typereference.vala
+++ b/src/libvaladoc/apitree/typereference.vala
@@ -27,8 +27,7 @@ public class Valadoc.TypeReference : Basic {
private Gee.ArrayList<TypeReference> type_arguments = new Gee.ArrayList<TypeReference> ();
private Vala.DataType? vtyperef;
- public TypeReference (Valadoc.Settings settings, Vala.DataType? vtyperef, Basic parent) {
- this.settings = settings;
+ public TypeReference (Vala.DataType? vtyperef, Api.Item parent) {
this.vtyperef = vtyperef;
this.parent = parent;
}
@@ -39,7 +38,7 @@ public class Valadoc.TypeReference : Basic {
private void set_template_argument_list (Tree root, Gee.Collection<Vala.DataType> varguments) {
foreach ( Vala.DataType vdtype in varguments ) {
- var dtype = new TypeReference (this.settings, vdtype, this);
+ var dtype = new TypeReference (vdtype, this);
dtype.resolve_type_references (root);
this.type_arguments.add ( dtype );
}
@@ -187,9 +186,9 @@ public class Valadoc.TypeReference : Basic {
protected override void resolve_type_references (Tree root) {
if ( this.vtyperef != null ) {
if ( this.vtyperef is PointerType )
- this.data_type = new Pointer (settings, (Vala.PointerType) this.vtyperef, this);
+ this.data_type = new Pointer ((Vala.PointerType) this.vtyperef, this);
else if ( vtyperef is ArrayType )
- this.data_type = new Array (settings, (Vala.ArrayType) this.vtyperef, this);
+ this.data_type = new Array ((Vala.ArrayType) this.vtyperef, this);
else if ( vtyperef is GenericType )
this.data_type = (TypeParameter) root.search_vala_symbol (((Vala.GenericType) this.vtyperef).type_parameter);
}
diff --git a/src/libvaladoc/apitree/visitable.vala b/src/libvaladoc/apitree/visitable.vala
index 012d4a5..bcb03d4 100644
--- a/src/libvaladoc/apitree/visitable.vala
+++ b/src/libvaladoc/apitree/visitable.vala
@@ -21,9 +21,9 @@ using Vala;
using GLib;
using Gee;
+// Rename to Browsable
public interface Valadoc.Visitable : Api.Item {
- protected abstract bool is_type_visitor_accessible (Valadoc.Basic element);
-
- public abstract bool is_visitor_accessible ();
+ // Rename to is_browsable
+ public abstract bool is_visitor_accessible (Settings settings);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]