From: Didier 'Ptitjes Date: Sun, 27 Sep 2009 09:22:29 +0000 (+0200) Subject: Move to new gee X-Git-Tag: 0.37.1~3^2~575 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2687f675b3d1dd1dd6498b665f1118f29c422e75;p=thirdparty%2Fvala.git Move to new gee --- diff --git a/src/doclets/devhelp/doclet/doclet.vala b/src/doclets/devhelp/doclet/doclet.vala index dd7e21aed..fa7f4e9f9 100755 --- a/src/doclets/devhelp/doclet/doclet.vala +++ b/src/doclets/devhelp/doclet/doclet.vala @@ -223,7 +223,7 @@ public class Valadoc.Devhelp.Doclet : Valadoc.Html.BasicDoclet { this.write_wiki_pages ( tree, css_path_wiki, Path.build_filename(this.settings.path, this.settings.pkg_name, "content") ); - Gee.ReadOnlyCollection packages = tree.get_package_list (); + Gee.Collection packages = tree.get_package_list (); foreach ( Package pkg in packages ) { pkg.visit ( this ); } diff --git a/src/doclets/htm/doclet/doclet.vala b/src/doclets/htm/doclet/doclet.vala index a3f433dca..d9f376202 100755 --- a/src/doclets/htm/doclet/doclet.vala +++ b/src/doclets/htm/doclet/doclet.vala @@ -127,7 +127,7 @@ public class Valadoc.HtmlDoclet : Valadoc.Html.BasicDoclet { this.langlet = new Valadoc.Html.BasicLanglet ( settings ); - Gee.ReadOnlyCollection packages = tree.get_package_list (); + Gee.Collection packages = tree.get_package_list (); foreach ( Package pkg in packages ) { pkg.visit ( this ); } diff --git a/src/doclets/htmlhelpers/doclet/doclet.vala b/src/doclets/htmlhelpers/doclet/doclet.vala index 40a3222c3..3192bd98d 100755 --- a/src/doclets/htmlhelpers/doclet/doclet.vala +++ b/src/doclets/htmlhelpers/doclet/doclet.vala @@ -149,7 +149,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void fetch_subnamespace_names ( NamespaceHandler pos, Gee.ArrayList lst ) { - Gee.ReadOnlyCollection nspaces = pos.get_namespace_list (); + Gee.Collection nspaces = pos.get_namespace_list (); foreach ( Namespace ns in nspaces ) { lst.add ( ns ); @@ -260,7 +260,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_enum_inline ( GLib.FileStream file, Enum en, DocumentedElement? mself ) { - Gee.ReadOnlyCollection enum_values = en.get_enum_values ( ); + Gee.Collection enum_values = en.get_enum_values ( ); file.printf ( "
    \n", css_navi ); foreach ( EnumValue env in enum_values ) { @@ -280,7 +280,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, DocumentedElement? mself = null ) { - Gee.ReadOnlyCollection error_codes = errdom.get_error_code_list ( ); + Gee.Collection error_codes = errdom.get_error_code_list ( ); file.printf ( "
      \n", css_navi ); foreach ( ErrorCode ec in error_codes ) { @@ -493,12 +493,12 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = mh.get_method_list ( ); + Gee.Collection methods = mh.get_method_list ( ); this.write_navi_child_methods_collection ( file, methods, mself ); } protected void write_navi_child_static_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = mh.get_method_list ( ); + Gee.Collection methods = mh.get_method_list ( ); this.write_navi_child_static_methods_collection ( file, methods, mself ); } @@ -512,17 +512,17 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection classes = clh.get_class_list ( ); + Gee.Collection classes = clh.get_class_list ( ); this.write_navi_child_classes_without_childs_collection ( file, classes, mself ); } protected void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = cmh.get_construction_method_list ( ); + Gee.Collection methods = cmh.get_construction_method_list ( ); this.write_navi_child_construction_methods_collection ( file, methods, mself ); } protected void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection signals = sh.get_signal_list ( ); + Gee.Collection signals = sh.get_signal_list ( ); foreach ( Signal sig in signals ) { if ( sig == mself ) @@ -533,7 +533,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, DocumentedElement? mself ) { - Gee.ReadOnlyCollection properties = ph.get_property_list ( ); + Gee.Collection properties = ph.get_property_list ( ); foreach ( Property p in properties ) { string css; @@ -561,7 +561,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection fields = fh.get_field_list ( ); + Gee.Collection fields = fh.get_field_list ( ); this.write_navi_child_fields_collection ( file, fields, mself ); } @@ -575,7 +575,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) { - Gee.ReadOnlyCollection constants = ch.get_constant_list ( ); + Gee.Collection constants = ch.get_constant_list ( ); this.write_navi_child_constants_collection ( file, constants, mself ); } @@ -650,7 +650,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection namespaces = nsh.get_namespace_list ( ); + Gee.Collection namespaces = nsh.get_namespace_list ( ); foreach ( Namespace ns in namespaces ) { if ( ns.name == null ) continue ; @@ -686,7 +686,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { if ( doctree == null ) return ; - Gee.ReadOnlyCollection brief = doctree.get_brief ( ); + Gee.Collection brief = doctree.get_brief ( ); if ( brief.size > 0 ) { file.printf ( " - ", css_inline_navigation_brief_description ); int _max = brief.size; @@ -710,7 +710,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { if ( doctree == null ) return ; - Gee.ReadOnlyCollection brief = doctree.get_brief ( ); + Gee.Collection brief = doctree.get_brief ( ); if ( brief.size > 0 ) { doctree.write_brief ( file ); } @@ -780,7 +780,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } public void write_child_error_values ( GLib.FileStream file, ErrorDomain errdom ) { - Gee.ReadOnlyCollection error_codes = errdom.get_error_code_list (); + Gee.Collection error_codes = errdom.get_error_code_list (); if ( error_codes.size > 0 ) { file.printf ( "

      Error Codes:

      \n", css_title ); file.printf ( "\n", css_errordomain_table ); @@ -910,7 +910,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } private void write_child_enum_values ( GLib.FileStream file, Enum en ) { - Gee.ReadOnlyCollection enum_values = en.get_enum_values (); + Gee.Collection enum_values = en.get_enum_values (); if ( enum_values.size > 0 ) { file.printf ( "

      Enum Values:

      \n", css_title ); file.printf ( "
      \n", css_enum_table ); @@ -966,7 +966,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = mh.get_method_list (); + Gee.Collection methods = mh.get_method_list (); Gee.ArrayList imethods = new Gee.ArrayList ( ); foreach ( Method m in methods ) { if ( !m.is_static ) @@ -986,7 +986,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_dependencies ( GLib.FileStream file, Package package, DocumentedElement? mself ) { - Gee.ReadOnlyCollection deps = package.get_full_dependency_list (); + Gee.Collection deps = package.get_full_dependency_list (); if ( deps.size == 0 ) return ; @@ -1003,7 +1003,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_static_methods ( GLib.FileStream file, MethodHandler mh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = mh.get_method_list (); + Gee.Collection methods = mh.get_method_list (); Gee.ArrayList static_methods = new Gee.ArrayList ( ); foreach ( Method m in methods ) { @@ -1145,7 +1145,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch, DocumentedElement? mself ) { - Gee.ReadOnlyCollection constants = ch.get_constant_list (); + Gee.Collection constants = ch.get_constant_list (); if ( constants.size > 0 ) { file.printf ( "

      Constants:

      \n", css_title ); file.printf ( "
        \n", css_inline_navigation ); @@ -1187,7 +1187,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection methods = cmh.get_construction_method_list (); + Gee.Collection methods = cmh.get_construction_method_list (); if ( methods.size > 0 ) { file.printf ( "

        Construction Methods:

        \n", css_title ); file.printf ( "
          \n", css_inline_navigation ); @@ -1219,7 +1219,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_fields ( GLib.FileStream file, FieldHandler fh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection fields = fh.get_field_list (); + Gee.Collection fields = fh.get_field_list (); if ( fields.size > 0 ) { file.printf ( "

          Fields:

          \n", css_title ); file.printf ( "
            \n", css_inline_navigation ); @@ -1233,7 +1233,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_properties ( GLib.FileStream file, PropertyHandler ph, DocumentedElement? mself ) { - Gee.ReadOnlyCollection properties = ph.get_property_list (); + Gee.Collection properties = ph.get_property_list (); if ( properties.size > 0 ) { file.printf ( "

            Properties:

            \n", css_title ); file.printf ( "
              \n", css_inline_navigation ); @@ -1247,7 +1247,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_signals ( GLib.FileStream file, SignalHandler sh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection signals = sh.get_signal_list (); + Gee.Collection signals = sh.get_signal_list (); if ( signals.size > 0 ) { file.printf ( "

              Signals:

              \n", css_title ); file.printf ( "
                \n", css_inline_navigation ); @@ -1261,7 +1261,7 @@ public abstract class Valadoc.Html.BasicDoclet : Valadoc.Doclet { } protected void write_child_classes ( GLib.FileStream file, ClassHandler clh, DocumentedElement? mself ) { - Gee.ReadOnlyCollection classes = clh.get_class_list (); + Gee.Collection classes = clh.get_class_list (); if ( classes.size > 0 ) { file.printf ( "

                Classes:

                \n", css_title ); file.printf ( "
                  \n", css_inline_navigation ); diff --git a/src/doclets/htmlhelpers/doclet/langlet.vala b/src/doclets/htmlhelpers/doclet/langlet.vala index 8833bb222..b73cb9735 100755 --- a/src/doclets/htmlhelpers/doclet/langlet.vala +++ b/src/doclets/htmlhelpers/doclet/langlet.vala @@ -217,7 +217,7 @@ public class Valadoc.Html.BasicLanglet : Valadoc.Langlet { } private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) { - Gee.ReadOnlyCollection error_domains = exception_handler.get_error_domains (); + Gee.Collection error_domains = exception_handler.get_error_domains (); int size = error_domains.size; int i = 1; diff --git a/src/libvaladoc/apitree/apitree.vala b/src/libvaladoc/apitree/apitree.vala index 882aa07d2..31a9e8319 100644 --- a/src/libvaladoc/apitree/apitree.vala +++ b/src/libvaladoc/apitree/apitree.vala @@ -40,8 +40,8 @@ public class Valadoc.Tree : Vala.CodeVisitor { get; } - public Gee.ReadOnlyCollection get_package_list () { - return new Gee.ReadOnlyCollection ( this.packages ); + public Gee.Collection get_package_list () { + return this.packages.read_only_view; } private void add_dependencies_to_source_package () { diff --git a/src/libvaladoc/apitree/classhandler.vala b/src/libvaladoc/apitree/classhandler.vala index 04f8f7063..be5e20636 100644 --- a/src/libvaladoc/apitree/classhandler.vala +++ b/src/libvaladoc/apitree/classhandler.vala @@ -59,7 +59,7 @@ public interface Valadoc.ClassHandler : Basic { return null; } - public Gee.ReadOnlyCollection get_class_list ( ) { + public Gee.Collection get_class_list ( ) { var lst = new Gee.ArrayList (); foreach ( Class cl in this.classes ) { if ( !cl.is_type_visitor_accessible ( this ) ) @@ -68,7 +68,7 @@ public interface Valadoc.ClassHandler : Basic { lst.add ( cl ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } internal void add_class ( Vala.Class vcl ) { diff --git a/src/libvaladoc/apitree/constanthandler.vala b/src/libvaladoc/apitree/constanthandler.vala index 310394c7d..e9fbb484b 100644 --- a/src/libvaladoc/apitree/constanthandler.vala +++ b/src/libvaladoc/apitree/constanthandler.vala @@ -58,7 +58,7 @@ public interface Valadoc.ConstantHandler : Basic { return null; } - public Gee.ReadOnlyCollection get_constant_list ( ) { + public Gee.Collection get_constant_list ( ) { var lstd = new Gee.ArrayList (); foreach (Constant c in this.constants) { if (!c.is_type_visitor_accessible (this) ) @@ -67,7 +67,7 @@ public interface Valadoc.ConstantHandler : Basic { lstd.add (c); } - return new Gee.ReadOnlyCollection(lstd); + return lstd.read_only_view; } internal void add_constants (Gee.Collection vconstants) { diff --git a/src/libvaladoc/apitree/constructionmethodhandler.vala b/src/libvaladoc/apitree/constructionmethodhandler.vala index 6262fa0b1..6a6f00468 100644 --- a/src/libvaladoc/apitree/constructionmethodhandler.vala +++ b/src/libvaladoc/apitree/constructionmethodhandler.vala @@ -63,7 +63,7 @@ public interface Valadoc.ConstructionMethodHandler : Basic, MethodHandler { return null; } - public Gee.ReadOnlyCollection get_construction_method_list ( ) { + public Gee.Collection get_construction_method_list ( ) { var lst = new Gee.ArrayList (); foreach ( Method cm in this.construction_methods ) { if ( !cm.is_type_visitor_accessible ( this ) ) @@ -72,7 +72,7 @@ public interface Valadoc.ConstructionMethodHandler : Basic, MethodHandler { lst.add ( cm ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } protected void parse_construction_method_comments ( Valadoc.Parser docparser ) { diff --git a/src/libvaladoc/apitree/delegatehandler.vala b/src/libvaladoc/apitree/delegatehandler.vala index 906b3cd0c..c8d24fdb1 100644 --- a/src/libvaladoc/apitree/delegatehandler.vala +++ b/src/libvaladoc/apitree/delegatehandler.vala @@ -64,7 +64,7 @@ public interface Valadoc.DelegateHandler : Basic { lst.add ( del ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } public void visit_delegates ( Doclet doclet ) { diff --git a/src/libvaladoc/apitree/enum.vala b/src/libvaladoc/apitree/enum.vala index ced9728f8..d71a83411 100644 --- a/src/libvaladoc/apitree/enum.vala +++ b/src/libvaladoc/apitree/enum.vala @@ -130,8 +130,8 @@ public class Valadoc.Enum : DocumentedElement, SymbolAccessibility, Visitable, M } // rename: get_enum_value_list - public Gee.ReadOnlyCollection get_enum_values () { - return new Gee.ReadOnlyCollection( this.en_values ); + public Gee.Collection get_enum_values () { + return this.en_values.read_only_view; } internal void parse_comments ( Valadoc.Parser docparser ) { diff --git a/src/libvaladoc/apitree/enumhandler.vala b/src/libvaladoc/apitree/enumhandler.vala index 10020bd34..1efe3b1ff 100644 --- a/src/libvaladoc/apitree/enumhandler.vala +++ b/src/libvaladoc/apitree/enumhandler.vala @@ -62,7 +62,7 @@ public interface Valadoc.EnumHandler : Basic { lst.add ( en ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } public void visit_enums ( Doclet doclet ) { diff --git a/src/libvaladoc/apitree/errordomain.vala b/src/libvaladoc/apitree/errordomain.vala index 180e69bfb..dbcfe0d50 100644 --- a/src/libvaladoc/apitree/errordomain.vala +++ b/src/libvaladoc/apitree/errordomain.vala @@ -142,8 +142,8 @@ public class Valadoc.ErrorDomain : DocumentedElement, SymbolAccessibility, Visit errcode.visit ( doclet ); } - public Gee.ReadOnlyCollection get_error_code_list ( ) { - return new Gee.ReadOnlyCollection ( this.errcodes ); + public Gee.Collection get_error_code_list ( ) { + return this.errcodes.read_only_view; } public void visit ( Doclet doclet ) { diff --git a/src/libvaladoc/apitree/errordomainhandler.vala b/src/libvaladoc/apitree/errordomainhandler.vala index 32d603fb6..69711fc44 100644 --- a/src/libvaladoc/apitree/errordomainhandler.vala +++ b/src/libvaladoc/apitree/errordomainhandler.vala @@ -56,7 +56,7 @@ public interface Valadoc.ErrorDomainHandler : Basic { lst.add ( errdom ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } internal ErrorDomain? find_errordomain ( Vala.ErrorDomain ver ) { diff --git a/src/libvaladoc/apitree/exceptionlisthandler.vala b/src/libvaladoc/apitree/exceptionlisthandler.vala index be7d27637..7c3a15a3b 100644 --- a/src/libvaladoc/apitree/exceptionlisthandler.vala +++ b/src/libvaladoc/apitree/exceptionlisthandler.vala @@ -30,8 +30,8 @@ public interface Valadoc.ExceptionHandler : Basic { get; } - public Gee.ReadOnlyCollection get_error_domains ( ) { - return new Gee.ReadOnlyCollection ( this.err_domains ); + public Gee.Collection get_error_domains ( ) { + return this.err_domains.read_only_view; } public void add_exception_list ( Gee.Collection vexceptions ) { diff --git a/src/libvaladoc/apitree/fieldhandler.vala b/src/libvaladoc/apitree/fieldhandler.vala index e429336ff..d5e3d3af7 100644 --- a/src/libvaladoc/apitree/fieldhandler.vala +++ b/src/libvaladoc/apitree/fieldhandler.vala @@ -58,7 +58,7 @@ public interface Valadoc.FieldHandler : Basic { return null; } - public Gee.ReadOnlyCollection get_field_list ( ) { + public Gee.Collection get_field_list ( ) { var lstd = new Gee.ArrayList (); foreach ( Field f in this.fields ) { if ( !f.is_type_visitor_accessible ( this ) ) @@ -67,7 +67,7 @@ public interface Valadoc.FieldHandler : Basic { lstd.add ( f ); } - return new Gee.ReadOnlyCollection( lstd ); + return lstd.read_only_view; } internal void add_fields ( Gee.Collection vfields ) { diff --git a/src/libvaladoc/apitree/interfacehandler.vala b/src/libvaladoc/apitree/interfacehandler.vala index 35f3f9375..8f45722bb 100644 --- a/src/libvaladoc/apitree/interfacehandler.vala +++ b/src/libvaladoc/apitree/interfacehandler.vala @@ -56,7 +56,7 @@ public interface Valadoc.InterfaceHandler : Basic { lst.add ( iface ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } public void visit_interfaces ( Doclet doclet ) { diff --git a/src/libvaladoc/apitree/methodhandler.vala b/src/libvaladoc/apitree/methodhandler.vala index a882a402e..0c7b34aa1 100644 --- a/src/libvaladoc/apitree/methodhandler.vala +++ b/src/libvaladoc/apitree/methodhandler.vala @@ -87,7 +87,7 @@ public interface Valadoc.MethodHandler : Basic { } } - public Gee.ReadOnlyCollection get_method_list ( ) { + public Gee.Collection get_method_list ( ) { var lst = new Gee.ArrayList (); foreach ( Method m in this.methods ) { if ( !m.is_type_visitor_accessible ( this ) ) @@ -96,7 +96,7 @@ public interface Valadoc.MethodHandler : Basic { lst.add ( m ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } } diff --git a/src/libvaladoc/apitree/namespacehandler.vala b/src/libvaladoc/apitree/namespacehandler.vala index 1f0abc48a..961f24fda 100644 --- a/src/libvaladoc/apitree/namespacehandler.vala +++ b/src/libvaladoc/apitree/namespacehandler.vala @@ -29,8 +29,8 @@ public interface Valadoc.NamespaceHandler : Basic { get; } - public Gee.ReadOnlyCollection get_namespace_list () { - return new Gee.ReadOnlyCollection ( this.namespaces ); + public Gee.Collection get_namespace_list () { + return this.namespaces.read_only_view; } public void visit_namespaces ( Doclet doclet ) { diff --git a/src/libvaladoc/apitree/package.vala b/src/libvaladoc/apitree/package.vala index 02e6b32e0..26ef9ed83 100644 --- a/src/libvaladoc/apitree/package.vala +++ b/src/libvaladoc/apitree/package.vala @@ -48,11 +48,11 @@ public class Valadoc.Package : DocumentedElement, NamespaceHandler { private Gee.ArrayList _dependencies; - public Gee.ReadOnlyCollection get_full_dependency_list () { + public Gee.Collection get_full_dependency_list () { Gee.ArrayList list = new Gee.ArrayList (); if ( this._dependencies == null ) - return new Gee.ReadOnlyCollection ( list ); + return list.read_only_view; foreach ( Package pkg in this._dependencies ) { if ( list.contains ( pkg ) == false ) { @@ -66,15 +66,15 @@ public class Valadoc.Package : DocumentedElement, NamespaceHandler { } } } - return new Gee.ReadOnlyCollection ( list ); + return list.read_only_view; } - public Gee.ReadOnlyCollection get_dependency_list () { + public Gee.Collection get_dependency_list () { if ( this._dependencies == null ) { - return new Gee.ReadOnlyCollection ( new Gee.ArrayList () ); + return Collection.empty (); } - return new Gee.ReadOnlyCollection ( this._dependencies ); + return this._dependencies.read_only_view; } private static string extract_package_name ( Settings settings, Vala.SourceFile vfile ) { diff --git a/src/libvaladoc/apitree/parameterlisthandler.vala b/src/libvaladoc/apitree/parameterlisthandler.vala index 5d1dbddaa..6d68bfe4e 100644 --- a/src/libvaladoc/apitree/parameterlisthandler.vala +++ b/src/libvaladoc/apitree/parameterlisthandler.vala @@ -29,8 +29,8 @@ public interface Valadoc.ParameterListHandler : Basic { get; } - public Gee.ReadOnlyCollection get_parameter_list ( ) { - return new Gee.ReadOnlyCollection ( this.param_list ); + public Gee.Collection get_parameter_list ( ) { + return this.param_list.read_only_view; } protected void add_parameter_list ( Gee.Collection vparams ) { diff --git a/src/libvaladoc/apitree/propertyhandler.vala b/src/libvaladoc/apitree/propertyhandler.vala index 8083fa4cc..4d84e48c8 100644 --- a/src/libvaladoc/apitree/propertyhandler.vala +++ b/src/libvaladoc/apitree/propertyhandler.vala @@ -72,7 +72,7 @@ public interface Valadoc.PropertyHandler : Basic { return false; } - public Gee.ReadOnlyCollection get_property_list ( ) { + public Gee.Collection get_property_list ( ) { var lst = new Gee.ArrayList (); foreach ( Property p in this.properties ) { if ( !p.is_type_visitor_accessible ( this ) ) @@ -81,7 +81,7 @@ public interface Valadoc.PropertyHandler : Basic { lst.add ( p ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } protected void parse_property_comments ( Valadoc.Parser docparser ) { diff --git a/src/libvaladoc/apitree/signalhandler.vala b/src/libvaladoc/apitree/signalhandler.vala index 03cc9c02c..573b7acc5 100644 --- a/src/libvaladoc/apitree/signalhandler.vala +++ b/src/libvaladoc/apitree/signalhandler.vala @@ -71,7 +71,7 @@ public interface Valadoc.SignalHandler : Basic { } } - public Gee.ReadOnlyCollection get_signal_list () { + public Gee.Collection get_signal_list () { var lst = new Gee.ArrayList (); foreach ( Signal sig in this.signals ) { if ( !sig.is_type_visitor_accessible ( this ) ) @@ -80,7 +80,7 @@ public interface Valadoc.SignalHandler : Basic { lst.add ( sig ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } internal void set_signal_type_references () { diff --git a/src/libvaladoc/apitree/structhandler.vala b/src/libvaladoc/apitree/structhandler.vala index 2124b7361..f42f8b669 100644 --- a/src/libvaladoc/apitree/structhandler.vala +++ b/src/libvaladoc/apitree/structhandler.vala @@ -57,7 +57,7 @@ public interface Valadoc.StructHandler : Basic { lst.add ( stru ); } - return new Gee.ReadOnlyCollection( lst ); + return lst.read_only_view; } public void add_struct ( Vala.Struct vstru ) { diff --git a/src/libvaladoc/apitree/templateparameterlisthandler.vala b/src/libvaladoc/apitree/templateparameterlisthandler.vala index 5b0bb9bd8..02d849a81 100644 --- a/src/libvaladoc/apitree/templateparameterlisthandler.vala +++ b/src/libvaladoc/apitree/templateparameterlisthandler.vala @@ -41,8 +41,8 @@ public interface Valadoc.TemplateParameterListHandler : Basic { return null; } - public Gee.ReadOnlyCollection get_template_param_list ( ) { - return new Gee.ReadOnlyCollection ( this.template_param_lst ); + public Gee.Collection get_template_param_list ( ) { + return this.template_param_lst.read_only_view; } internal void set_template_parameter_list ( Gee.Collection vtparams ) { diff --git a/src/libvaladoc/apitree/typereference.vala b/src/libvaladoc/apitree/typereference.vala index 828348e3a..0c920d5a9 100644 --- a/src/libvaladoc/apitree/typereference.vala +++ b/src/libvaladoc/apitree/typereference.vala @@ -34,8 +34,8 @@ public class Valadoc.TypeReference : Basic { this.head = head; } - public Gee.ReadOnlyCollection get_type_arguments ( ) { - return new Gee.ReadOnlyCollection ( this.type_arguments ); + public Gee.Collection get_type_arguments ( ) { + return this.type_arguments.read_only_view; } private void set_template_argument_list ( Gee.Collection varguments ) { diff --git a/src/libvaladoc/documentation/doctree.vala b/src/libvaladoc/documentation/doctree.vala index fca49d3d0..23c889875 100755 --- a/src/libvaladoc/documentation/doctree.vala +++ b/src/libvaladoc/documentation/doctree.vala @@ -216,16 +216,16 @@ public class Valadoc.DocumentationTree : Object { } } - public Gee.ReadOnlyCollection get_brief ( ) { - return new Gee.ReadOnlyCollection ((this.brief == null)? new Gee.ArrayList() : this.brief); + public Gee.Collection get_brief ( ) { + return this.brief == null ? Collection.empty () : this.brief.read_only_view; } public void add_brief (Gee.ArrayList content) { this.brief = content; } - public Gee.ReadOnlyCollection get_description () { - return new Gee.ReadOnlyCollection ((this.description == null)? new Gee.ArrayList() : this.description); + public Gee.Collection get_description () { + return this.description == null ? Collection.empty () : this.description.read_only_view; } public void add_description (Gee.ArrayList content) { @@ -292,7 +292,7 @@ public class Valadoc.DocumentationTree : Object { i++; } - Gee.Collection< Gee.ArrayList > lst = this.taglets.get_values ( ); + Gee.Collection< Gee.ArrayList > lst = this.taglets.values; Gee.ArrayList< Gee.ArrayList > alst = sort_tag_collection ( lst ); foreach (Gee.ArrayList tags in alst) { diff --git a/src/libvaladoc/documentation/moduleloader.vala b/src/libvaladoc/documentation/moduleloader.vala index a78dd003e..ff96f90a6 100755 --- a/src/libvaladoc/documentation/moduleloader.vala +++ b/src/libvaladoc/documentation/moduleloader.vala @@ -91,6 +91,9 @@ public class Valadoc.ModuleLoader : Object { GLib.Dir dir = GLib.Dir.open (pluginpath); + taglets.set ("toto", typeof (Type)); + taglets.unset ("toto"); + for (weak string entry = dir.read_name(); entry != null ; entry = dir.read_name()) { if (!entry.has_suffix("." + Module.SUFFIX)) continue; diff --git a/src/libvaladoc/documentation/wiki.vala b/src/libvaladoc/documentation/wiki.vala index b0ed31e3b..76d25a50e 100755 --- a/src/libvaladoc/documentation/wiki.vala +++ b/src/libvaladoc/documentation/wiki.vala @@ -97,7 +97,7 @@ public class Valadoc.WikiPageTree : Object { } public Gee.Collection get_pages () { - return new Gee.ReadOnlyCollection( (this.wikipages==null)? new Gee.ArrayList() : this.wikipages ); + return this.wikipages == null ? Gee.Collection.empty () : this.wikipages.read_only_view; } public WikiPage? search ( string name ) {