]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: mark @deprecated as deprecated
authorFlorian Brosch <flo.brosch@gmail.com>
Fri, 10 Feb 2012 06:25:42 +0000 (07:25 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Fri, 10 Feb 2012 06:30:30 +0000 (07:30 +0100)
src/libvaladoc/gtkdocrenderer.vala
src/libvaladoc/taglets/tagletdeprecated.vala

index eb4fe6840dbacf1e5c0bb9118f7f3f2056a86465..f13b09e9b011fa3298430dc7b7d82a022a1ff002 100644 (file)
@@ -99,7 +99,6 @@ public class Valadoc.GtkdocRenderer : ContentRenderer {
                append_exceptions (documentation.find_taglets (null, typeof(Taglets.Throws)));
                append_see (documentation.find_taglets (null, typeof(Taglets.See)));
                append_since (documentation.find_taglets (null, typeof(Taglets.Since)));
-               append_deprecated (documentation.find_taglets (null, typeof(Taglets.Deprecated)));
        }
 
        public override void render_children (ContentElement element) {
@@ -405,30 +404,6 @@ public class Valadoc.GtkdocRenderer : ContentRenderer {
                }
        }
 
-       public void append_deprecated (Gee.List<Content.Taglet> taglets) {
-               foreach (Content.Taglet _taglet in taglets) {
-                       Taglets.Deprecated taglet = _taglet as Taglets.Deprecated;
-                       if (taglet == null) {
-                               // ignore unexpected taglets
-                               continue ;
-                       }
-
-                       if (separated == false) {
-                               writer.text ("\n");
-                       }
-
-                       writer.set_wrap (false);
-                       writer.text ("\nDeprecated: ");
-                       taglet.accept_children (this);          
-                       writer.text (": ");
-                       separated = true;
-                       writer.set_wrap (true);
-
-                       // ignore multiple occurrences
-                       return ;
-               }
-       }
-
        public void append_see (Gee.List<Content.Taglet> taglets) {
                bool first = true;
                foreach (Content.Taglet _taglet in taglets) {
index 468f6ec55f15dc5d0371c3d5f672347e3ede9e7a..f685f3fe5ed4a90e365da87a118f11b533d80d74 100755 (executable)
@@ -31,6 +31,7 @@ public class Valadoc.Taglets.Deprecated : InlineContent, Taglet, Block {
 
        public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
                base.check (api_root, container, file_path, reporter, settings);
+               reporter.simple_warning ("warning: @deprecated is deprecated. Use [Deprecated]");
        }
 
        public override void accept (ContentVisitor visitor) {