From Rostislav Hristov Sun May 8 10:39:13 2005 From: Rostislav Hristov (Rostislav Hristov) Date: Sun, 8 May 2005 13:39:13 +0300 Subject: [as2api-dev] Recent build? Message-ID: <435de14305050803395eb2b53e@mail.gmail.com> ------=_Part_1405_33134604.1115548753310 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Dave, Congratulations for the good work. I would like to use as2api for the=20 documentation my framework. It's licensed under GPL and you can read more= =20 about it at http://www.asual.com/enflash/. I'll be very thankful if you provide a recent build, because the one on the= =20 website is about 6 months old. Cheers, Rostislav ------=_Part_1405_33134604.1115548753310 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Dave,

Congratulations for the good work. I would like to use as2api for the documentation my framework. It's licensed under GPL and you can read more about it at http://www.asual= .com/enflash/.
I'll be very thankful if you provide a recent build, because the one on the= website is about 6 months old.

Cheers,
Rostislav
------=_Part_1405_33134604.1115548753310-- From Rostislav Hristov Mon May 9 16:36:17 2005 From: Rostislav Hristov (Rostislav Hristov) Date: Mon, 9 May 2005 19:36:17 +0300 Subject: [as2api-dev] Re: Recent build? In-Reply-To: <435de14305050803395eb2b53e@mail.gmail.com> References: <435de14305050803395eb2b53e@mail.gmail.com> Message-ID: <435de143050509093675b00eb0@mail.gmail.com> ------=_Part_2469_16643377.1115656577672 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Well... I got the latest files from the CVS and successfully created a=20 descent documentation from the command line. Thanks Rostislav On 5/8/05, Rostislav Hristov wrote: >=20 > Hi Dave, >=20 > Congratulations for the good work. I would like to use as2api for the=20 > documentation my framework. It's licensed under GPL and you can read more= =20 > about it at http://www.asual.com/enflash/. > I'll be very thankful if you provide a recent build, because the one on= =20 > the website is about 6 months old. >=20 > Cheers, > Rostislav > ------=_Part_2469_16643377.1115656577672 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Well... I got the latest files from the CVS and successfully created a desc= ent documentation from the command line.

Thanks
Rostislav

On 5/8/05, Rostislav Hristov <rostislav.hristov@gmail.com> wrote:
Hi Dave,

Congratulations for the good work. I would like to use as2api for the documentation my framework. It's licensed under GPL and you can read more about it at http://www.asual= .com/enflash/.
I'll be very thankful if you provide a recent build, because the one on the= website is about 6 months old.

Cheers,
Rostislav

------=_Part_2469_16643377.1115656577672-- From dave at badgers-in-foil.co.uk Sat May 14 12:04:32 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 14 May 2005 12:04:32 +0000 Subject: [as2api-dev] Re: Recent build? In-Reply-To: <435de143050509093675b00eb0@mail.gmail.com> References: <435de14305050803395eb2b53e@mail.gmail.com> <435de143050509093675b00eb0@mail.gmail.com> Message-ID: <20050514120432.GA4668@vhost.badgers-in-foil.co.uk> Hi, sorry for the delayed reply, On Mon, May 09, 2005 at 07:36:17PM +0300, Rostislav Hristov wrote: > Well... I got the latest files from the CVS and successfully created a > descent documentation from the command line. I'm glad you were able to get something working. What build were you interested in, by the way? Windows? With any luck, I'll be committing a rewrite of the doc-comment parser soon, and I'll try to make time for a new release after that. dave -- http://david.holroyd.me.uk/ From Rostislav Hristov Sat May 14 12:29:18 2005 From: Rostislav Hristov (Rostislav Hristov) Date: Sat, 14 May 2005 15:29:18 +0300 Subject: [as2api-dev] Re: Recent build? In-Reply-To: <20050514120432.GA4668@vhost.badgers-in-foil.co.uk> References: <435de14305050803395eb2b53e@mail.gmail.com> <435de143050509093675b00eb0@mail.gmail.com> <20050514120432.GA4668@vhost.badgers-in-foil.co.uk> Message-ID: <435de14305051405292581ecb1@mail.gmail.com> ------=_Part_2395_31815677.1116073758519 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm doing fine with the Ruby scripts. I even started to edit the code so=20 that it can cover my needs. I hope I'll be ready with the docs in the next week and I'll send you my=20 edits. Is it possible to document public vars/fields that are only defined in the= =20 beggining of the class file? It will be good if its possible to document a specific private var/method. I have a method that makes some kind of overloading and takes different=20 number and types of params. They're not defined in the function input and I'm using the arguments array= =20 to catch them.=20 I haven't found a way to document such params, even included in the comment= =20 they seem to be dependent on the AS code. I was interested in a build for Windows, but not anymore :) Thanks. ------=_Part_2395_31815677.1116073758519 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm doing fine with the Ruby scripts. I even started to edit the code so th= at it can cover my needs.
I hope I'll be ready with the docs in the next week and I'll send you my ed= its.

Is it possible to document public vars/fields that are only defined in the = beggining of the class file?
It will be good if its possible to document a specific private var/method.<= br>
I have a method that makes some kind of overloading and takes different num= ber and types of params.
They're not defined in the function input and I'm using the arguments array= to catch them.
I haven't found a way to document such params, even included in the comment= they seem to be dependent on the AS code.

I was interested in a build for Windows, but not anymore :)

Thanks.
------=_Part_2395_31815677.1116073758519-- From dave at badgers-in-foil.co.uk Sat May 14 17:46:17 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 14 May 2005 17:46:17 +0000 Subject: [as2api-dev] [CVS trunk] Rewrite of doc-comment parser in a more flexible form. Message-ID:
Commit in trunk/as2api on MAIN
api_loader.rb+24-674 -> 75
doc_comment.rb+379-9674 -> 75
html_output.rb+103-2474 -> 75
+506-126
3 modified files
Rewrite of doc-comment parser in a more flexible form.

The old code was hardcoded to understand specific '@-tags', and would be
extended by adding clauses into a big case-when statatement.

The new archiecture provides generic parsing of JavaDoc @-tags, and allows
handler objects to be registered against tag names to process the information
contained in the tag.

Parsing of doc comments is now handled earlier, too.  We used to just collect
the comment text when the AS file was parsed, and then actually parse the
comment when generating the documentation.  Now, parsing of doc-comments
happens as they're encountered, which is far more natural.

The code is probably slightly more buggy than that which was replaced.
To make up for that, this commit also adds support for JavaDoc {@link ...}
syntax, which the old implementation didn't understand.

trunk/as2api
api_loader.rb 74 -> 75
--- trunk/as2api/api_loader.rb	2005-03-13 14:05:12 UTC (rev 74)
+++ trunk/as2api/api_loader.rb	2005-05-14 17:46:15 UTC (rev 75)
@@ -71,6 +71,13 @@
 # Builds a model of the API being processed as ActionScript::Parse::Parser
 # recognises pieces of the ActionScript grammar
 class DocASHandler < ActionScript::Parse::ASHandler
+  def initialize
+    parse_conf_build = ConfigBuilder.new
+    @method_comment_parser = DocCommentParser.new(parse_conf_build.build_method_config)
+    @field_comment_parser = DocCommentParser.new(parse_conf_build.build_field_config)
+    @type_comment_parser = DocCommentParser.new(parse_conf_build.build_type_config)
+  end
+
   def compilation_unit_start
     @type_resolver = LocalTypeResolver.new
     @import_manager = ImportManager.new
@@ -90,7 +97,8 @@
   def start_class(dynamic, name, super_name, interfaces)
     @defined_type = ASClass.new(name)
     if @doc_comment
-      @defined_type.comment = @doc_comment
+      input = create_comment_parser_input(@doc_comment)
+      @defined_type.comment = @type_comment_parser.parse(input)
     end
     @defined_type.dynamic = dynamic
     if super_name
@@ -113,7 +121,8 @@
   def start_interface(name, super_name)
     @defined_type = ASInterface.new(name)
     if @doc_comment
-      @defined_type.comment = @doc_comment
+      input = create_comment_parser_input(@doc_comment)
+      @defined_type.comment = @type_comment_parser.parse(input)
     end
     if super_name
       @defined_type.extends = @type_resolver.resolve(super_name)
@@ -143,6 +152,10 @@
     unless type.nil?
       field.field_type = @type_resolver.resolve(type)
     end
+    if @doc_comment
+      input = create_comment_parser_input(@doc_comment)
+      field.comment = @field_comment_parser.parse(input)
+    end
     @defined_type.add_field(field)
   end
 
@@ -177,7 +190,8 @@
       method.add_arg(argument)
     end
     if @doc_comment
-      method.comment = @doc_comment
+      input = create_comment_parser_input(@doc_comment)
+      method.comment = @method_comment_parser.parse(input)
     end
     method
   end
@@ -206,6 +220,10 @@
       raise "unknown property-modifier #{sig.implicit_property_modifier.inspect}"
     end
   end
+
+  def create_comment_parser_input(comment_token)
+    CommentInput.new(comment_token.body, comment_token.lineno, @type_resolver)
+  end
 end
 
 
@@ -297,12 +315,10 @@
     @named_types = {}
   end
 
-  def resolve(name)
+  def resolve(name, lineno=nil)
     if name.is_a?(Array)
       lineno = name.first.lineno
       name = name.join(".")
-    else
-      lineno = nil
     end
     type = @named_types[name]
     if type.nil?
@@ -426,3 +442,5 @@
     end
   end
 end
+
+# vim:softtabstop=2:shiftwidth=2

trunk/as2api
doc_comment.rb 74 -> 75
--- trunk/as2api/doc_comment.rb	2005-03-13 14:05:12 UTC (rev 74)
+++ trunk/as2api/doc_comment.rb	2005-05-14 17:46:15 UTC (rev 75)
@@ -1,137 +1,420 @@
 
-class DocComment
-  def DocComment.method(text)
-    doc = DocComment.new
-    doc.extract_method_doc(text)
-    doc
-  end
 
-  def DocComment.type(text)
-    doc = DocComment.new
-    doc.extract_type_doc(text)
-    doc
+class CommentInput
+  def initialize(text, lineno, type_resolver)
+    @text = text
+    @lineno = lineno
+    @type_resolver = type_resolver
   end
 
-  def initialize(type_resolver)
-    @description = nil
-    @params = {}
-    @desc_return = nil
-    @see_also = []
-    @exceptions = {}
-    @type_resolver = type_resolver
+  attr_accessor :text, :lineno, :type_resolver
+
+  def derive(text, lineno=nil)
+    lineno = @lineno if lineno.nil?
+    return CommentInput.new(text, lineno, @type_resolver)
   end
+end
 
-  def extract_method_doc(text)
-    text = strip_stars(text)
+
+class DocCommentParser
+  def initialize(config)
+    @config = config
   end
 
-  # strips leading stars (and any preceeding whitespace) from lines of
-  # comment text
   def parse(input)
-    state = :DESCRIPTION
-    description = ''
-    lines = input.split(/\n\r|\n|\r/)
+    data = CommentData.new
+    @config.begin_comment(data)
+    lines = input.text.split(/\n\r|\n|\r/)
+    lineno = input.lineno
     while text = lines.shift
-      text = strip_stars(text)
-      break if text =~ /^\s*@/
-      description << "\n" unless description==''
-      description << text
+      parse_line(input.derive(strip_stars(text), lineno))
+      lineno += 1
     end
-    state = nil
-    desc_return = nil
-    desc_throws = nil
-    desc_param = nil
-    seealso = nil
-    while text
-      text = strip_stars(text)
-      unless text =~ /^\s*$/
-        case text
-          when /^\s*@param\s+([^\s]+)\s+/
-	    state = :PARAM
-	    desc_param = $'
-	    add_param($1, desc_param)
-	  when /^\s*@return\s+/
-	    state = :RETURN
-	    desc_return = $'
-	  when /^\s*@see\s+/
-	    state = :SEE
-	    seealso = $'
-	    add_seealso(seealso)
-	  when /^\s*@throws\s+([^\s]+)/
-	    state = :THROWS
-	    desc_throws = $'
-	    add_exception($1, desc_throws)
-	  else
-	    case state
-	      when :PARAM
-	        desc_param << "\n" << text
-	      when :RETURN
-		desc_return << "\n" << text
-	      when :SEE
-		seealso << "\n" << text
-	      when :THROWS
-		desc_throws << "\n" << text
-	    end
-        end
-      end
-      text = lines.shift
+    @config.end_comment
+    return data
+  end
+
+  private
+
+  def strip_stars(text)
+    text.sub(/\A\s*\**/, "").sub(/\s*\Z/, "")
+  end
+
+  def parse_line(input)
+    if input.text =~ /^\s*@([a-zA-Z]+)\s*/
+      @config.begin_block($1)
+      @config.parse(input.derive($'))
+    else
+      @config.parse(input)
     end
-    self.desc_return = desc_return
-    self.description = description
   end
+end
 
-  def add_param(name, desc)
-    @params[name] = desc
+
+class CommentData
+  def initialize
+    @blocks = []
   end
 
-  def add_seealso(text)
-    @see_also << text
+  def add_block(block)
+    @blocks << block
   end
 
-  def seealso_a
-    @see_also
+  def each_block
+    @blocks.each do |block|
+      yield block
+    end
   end
 
-  def seealso?
-    !@see_also.empty?
+  def [](i)
+    @blocks[i]
   end
+end
 
-  def each_see_also
-    @see_also.each do |also|
-      yield also
+
+class DocCommentParserConfig
+  def initialize
+    @block_handlers = {}
+  end
+
+  def begin_comment(comment_data)
+    @comment_data = comment_data
+    @block = @description_block_handler
+    beginning_of_block
+  end
+
+  def add_block_parser(name, handler)
+    @block_handlers[name] = handler
+    handler.handler = self
+  end
+
+  def description_handler=(handler)
+    @description_block_handler = handler
+  end
+
+  def end_comment
+    end_of_block
+  end
+
+  def begin_block(kind)
+    end_of_block
+    @block = handler_for(kind)
+    beginning_of_block
+  end
+
+  def parse(text)
+    @block.parse_line(text)
+  end
+
+  def parse_error(msg)
+    $stderr.puts(msg)
+  end
+
+  private
+
+  def handler_for(kind)
+    handler = @block_handlers[kind]
+    if handler.nil?
+      parse_error("Unknown block tag @#{kind}")
+      handler = NIL_HANDLER
     end
+    handler
   end
 
-  def strip_stars(text)
-    text.sub(/\A\s*\**/, "").sub(/\s*\Z/, "")
+  def beginning_of_block
+    @block.begin_block
   end
 
-  attr_accessor :desc_return, :description
+  def end_of_block
+    data = @block.end_block
+    @comment_data.add_block(data) unless data.nil?
+  end
+end
 
-  def param(name)
-    @params[name]
+
+class LinkTag
+  def initialize(target, text)
+    @target = target
+    @text = text
   end
 
-  def parameters?
-    !@params.empty?
+  attr_accessor :target, :text
+end
+
+
+class BlockTag
+  def initialize
+    @inlines = []
   end
 
-  def add_exception(type, desc)
-    # NB: desc may get modified by the caller after this method is invoked
-    @exceptions[@type_resolver.resolve(type)] = desc
+  def add_inline(inline)
+    @inlines << inline
   end
 
-  def each_exception
-    @exceptions.each do |type, desc|
-      yield type, desc
+  def each_inline
+    @inlines.each do |inline|
+      yield inline
     end
   end
+end
 
-  def describe_exception(type)
-    @exceptions[type]
+
+class ParamBlockTag < BlockTag
+  attr_accessor :param_name
+end
+
+
+class ThrowsBlockTag < BlockTag
+  attr_accessor :exception_type
+end
+
+
+class SeeBlockTag < BlockTag
+end
+
+
+class ReturnBlockTag < BlockTag
+end
+
+
+class InlineParser
+  def parse(block_data, inpu)
+    raise "implement me"
   end
+end
 
-  def exceptions?
-    !@exceptions.empty?
+
+# creates a LinkTag inline
+def create_link(input)
+  if input.text =~ /^([^ ]+(?:\([^\)]*\))?)\s*/
+    target = $1
+    text = $'
+    type_proxy = input.type_resolver.resolve(target, input.lineno)
+    return LinkTag.new(type_proxy, text)
+else
   end
+  return nil
 end
+
+
+class LinkInlineParser < InlineParser
+  def parse(block_data, input)
+    link = create_link(input)
+    if link.nil?
+      block_data.add_inline("{@link #{input.text}}")
+    else
+      block_data.add_inline(link)
+    end
+  end
+end
+
+
+class BlockParser
+  def initialize
+    @inline_parsers = {}
+    @data = nil
+  end
+
+  attr_accessor :handler
+
+  def begin_block
+  end
+
+  def parse_line(text)
+  end
+
+  def end_block
+    @data
+  end
+
+  def add_inline_parser(tag_name, parser)
+    @inline_parsers[tag_name] = parser
+  end
+
+  def parse_inlines(input)
+    text = input.text
+    while text.length > 0
+      if text =~ /\A\{@([^}\s]+)\s*([^}]*)\}/
+	tag_name = $1
+	tag_data = $2
+	inline_parser = @inline_parsers[tag_name]
+	if inline_parser.nil?
+	  add_text($&)
+	else
+	  inline_parser.parse(@data, input.derive(tag_data))
+	end
+	text = $'
+      elsif text =~ /\A.[^{]*/
+	add_text($&)
+	text = $'
+      else
+	raise "#{input.lineno}: no match for #{text.inspect}"
+      end
+    end
+  end
+
+  def add_text(text)
+    @data.add_inline(text)
+  end
+end
+
+
+NIL_HANDLER = BlockParser.new
+
+
+class ParamParser < BlockParser
+  def begin_block
+    @data = ParamBlockTag.new
+  end
+
+  def parse_line(input)
+    if @data.param_name.nil?
+      input.text =~ /\s*([^\s]+)\s+/
+      @data.param_name = $1
+      input = input.derive($')
+    end
+    parse_inlines(input)
+  end
+end
+
+
+class ThrowsParser < BlockParser
+  def begin_block
+    @data = ThrowsBlockTag.new
+  end
+
+  def parse_line(input)
+    if @data.exception_type.nil?
+      input.text =~ /\A\s*([^\s]+)\s+/
+      @data.exception_type = input.type_resolver.resolve($1)
+      input = input.derive($')
+    end
+    parse_inlines(input)
+  end
+end
+
+
+class ReturnParser < BlockParser
+  def begin_block
+    @data = ReturnBlockTag.new
+  end
+  def parse_line(input)
+    parse_inlines(input)
+  end
+end
+
+
+class DescriptionParser < BlockParser
+  def begin_block
+    @data = BlockTag.new
+  end
+  def parse_line(input)
+    parse_inlines(input)
+  end
+end
+
+
+class SeeParser < BlockParser
+  def begin_block
+    @data = nil
+  end
+
+  def parse_line(input)
+    if @data.nil?
+      @data = SeeBlockTag.new
+      input.text =~ /\A\s*/
+      case $'
+	when /['"]/
+	  # plain, 'string'-like see entry
+	  @data.add_inline(input.text)
+	when /</
+	  # HTML entry
+	  @data.add_inline(input.text)
+	else
+	  # 'link' entry
+	  link = create_link(input)
+	  if link.nil?
+	    @data.add_inline(input.text)
+	  else
+	    @data.add_inline(link)
+	  end
+      end
+    else
+      $stderr.puts "@see tag didn't handle extra line #{input.text.inspect}"
+    end
+  end
+end
+
+
+#############################################################################
+
+
+class ConfigBuilder
+  def build_method_config
+    config = build_config
+    add_standard_block_parsers(config)
+    config.add_block_parser("param", build_param_block_parser)
+    config.add_block_parser("return", build_return_block_parser)
+    config.add_block_parser("throws", build_throws_block_parser)
+    return config
+  end
+
+  def build_field_config
+    config = build_config
+    add_standard_block_parsers(config)
+    return config
+  end
+
+  def build_type_config
+    config = build_config
+    add_standard_block_parsers(config)
+    return config
+  end
+
+  protected
+
+  def build_config
+    DocCommentParserConfig.new
+  end
+
+  def add_standard_block_parsers(config)
+    config.description_handler=build_description_block_parser
+    config.add_block_parser("see", build_see_block_parser)
+  end
+
+  def add_common_inlines(block_parser)
+    block_parser.add_inline_parser("link", LinkInlineParser.new)
+  end
+
+  def build_description_block_parser
+    parser = DescriptionParser.new
+    add_common_inlines(parser)
+    parser
+  end
+
+  def build_param_block_parser
+    parser = ParamParser.new
+    add_common_inlines(parser)
+    parser
+  end
+
+  def build_return_block_parser
+    parser = ReturnParser.new
+    add_common_inlines(parser)
+    parser
+  end
+
+  def build_throws_block_parser
+    parser = ThrowsParser.new
+    add_common_inlines(parser)
+    parser
+  end
+
+  def build_see_block_parser
+    parser = SeeParser.new
+    add_common_inlines(parser)
+    parser
+  end
+end
+
+# vim:softtabstop=2:shiftwidth=2

trunk/as2api
html_output.rb 74 -> 75
--- trunk/as2api/html_output.rb	2005-03-13 14:05:12 UTC (rev 74)
+++ trunk/as2api/html_output.rb	2005-05-14 17:46:15 UTC (rev 75)
@@ -135,6 +135,53 @@
   end
 end
 
+def comment_has_blocktype?(comment_data, type)
+  comment_data.each_block do |block|
+    return true if block.is_a?(type)
+  end
+  return false
+end
+
+def comment_has_params?(comment_data)
+  return comment_has_blocktype?(comment_data, ParamBlockTag)
+end
+
+def comment_has_exceptions?(comment_data)
+  return comment_has_blocktype?(comment_data, ThrowsBlockTag)
+end
+
+def comment_has_seealso?(comment_data)
+  return comment_has_blocktype?(comment_data, SeeBlockTag)
+end
+
+def comment_each_exception(comment_data)
+  comment_data.each_block do |block|
+    yield block if block.is_a?(ThrowsBlockTag)
+  end
+end
+
+def comment_each_seealso(comment_data)
+  comment_data.each_block do |block|
+    yield block if block.is_a?(SeeBlockTag)
+  end
+end
+
+def comment_find_param(comment_data, param_name)
+  comment_data.each_block do |block|
+    if block.is_a?(ParamBlockTag) && block.param_name == param_name
+      return block;
+    end
+  end
+  return nil
+end
+
+def comment_find_return(comment_data)
+  comment_data.each_block do |block|
+    return block if block.is_a?(ReturnBlockTag)
+  end
+  return nil
+end
+
 def document_method(out, type, method, alt_row=false)
   css_class = "method_details"
   css_class << " alt_row" if alt_row
@@ -144,56 +191,64 @@
     method_synopsis(out, method)
     if method.comment
       out.element_blockquote do
-	docs = DocComment.new(type.type_resolver)
-	docs.parse(method.comment.body)
-        out.pcdata(docs.description)
+        comment_data = method.comment
+        output_doccomment_blocktag(out, comment_data[0])
         out.element_dl("class"=>"method_additional_info") do
 	  # TODO: assumes that params named in docs match formal arguments
 	  #       should really filter out those that don't match before this
 	  #       test
-	  if docs.parameters?
+	  if comment_has_params?(comment_data)
 	    out.element_dt("Parameters")
 	    out.element_dd do
 	      out.element_table("class"=>"arguments", "summary"=>"") do
 		method.arguments.each do |arg|
-		  desc = docs.param(arg.name)
+		  desc = comment_find_param(comment_data, arg.name)
 		  if desc
 		    out.element_tr do
 		      out.element_td do
 			out.element_code(arg.name)
 		      end
-		      out.element_td(desc)
+		      out.element_td do
+                        output_doccomment_blocktag(out, desc)
+		      end
 		    end
 		  end
 		end
 	      end
 	    end
 	  end
-	  unless docs.desc_return.nil?
+	  return_comment = comment_find_return(comment_data)
+	  unless return_comment.nil?
 	    out.element_dt("Return")
 	    out.element_dd do
-	      out.pcdata(docs.desc_return)
+              output_doccomment_blocktag(out, return_comment)
 	    end
 	  end
-	  if docs.exceptions?
+	  if comment_has_exceptions?(comment_data)
             out.element_dt("throws")
             out.element_dd do
 	      out.element_table("class"=>"exceptions", "summary"=>"") do
-	        docs.each_exception do |type, desc|
+	        comment_each_exception(comment_data) do |exception_comment|
 		  out.element_tr do
 		    out.element_td do
-		      link_type_proxy(out, type)
+		      link_type_proxy(out, exception_comment.exception_type)
 		    end
-		    out.element_td(desc)
+		    out.element_td do
+                      output_doccomment_blocktag(out, exception_comment)
+		    end
 		  end
 	        end
 	      end
 	    end
 	  end
-	  if docs.seealso?
+	  if comment_has_seealso?(comment_data)
 	    out.element_dt("See Also")
 	    out.element_dd do
-	      list_see_also(out, docs)
+	      comment_each_seealso(comment_data) do |see_comment|
+	        out.element_p do
+                  output_doccomment_blocktag(out, see_comment)
+		end
+	      end
 	    end
 	  end
 	end
@@ -202,6 +257,22 @@
   end
 end
 
+def output_doccomment_blocktag(out, block)
+  block.each_inline do |inline|
+    output_doccomment_inlinetag(out, inline)
+  end
+end
+
+def output_doccomment_inlinetag(out, inline)
+  if inline.is_a?(String)
+    out.pcdata(inline)
+  elsif inline.is_a?(LinkTag)
+    link_type_proxy(out, inline.target)
+  else
+    out.element_em(inline.inspect)
+  end
+end
+
 def document_field(out, type, field)
   out.element_a("name"=>"field_#{field.name}")
   out.element_h3(field.name)
@@ -209,14 +280,17 @@
     field_synopsis(out, field)
     if field.comment
       out.element_blockquote do
-	docs = DocComment.new(type.type_resolver)
-	docs.parse(field.comment.body)
-        out.pcdata(docs.description)
+	comment_data = field.comment
+	output_doccomment_blocktag(out, comment_data[0])
         out.element_dl("class"=>"field_additional_info") do
-	  if docs.seealso?
+	  if comment_has_seealso?(comment_data)
 	    out.element_dt("See Also")
 	    out.element_dd do
-	      list_see_also(out, docs)
+	      comment_each_seealso(comment_data) do |see_comment|
+	        out.element_p do
+                  output_doccomment_blocktag(out, see_comment)
+		end
+	      end
 	    end
 	  end
 	end
@@ -477,18 +551,21 @@
     end
     out.element_div("class"=>"type_description") do
       if type.comment
-	docs = DocComment.new(type.type_resolver)
-	docs.parse(type.comment.body)
+        comment_data = type.comment
 
 	out.element_h2("Description")
 	out.element_p do
-	  out.pcdata(docs.description)
+          output_doccomment_blocktag(out, comment_data[0])
 	end
 	out.element_dl("class"=>"type_details") do
-	  if docs.seealso?
+	  if comment_has_seealso?(comment_data)
 	    out.element_dt("See Also")
 	    out.element_dd do
-	      list_see_also(out, docs)
+	      comment_each_seealso(comment_data) do |see_comment|
+	        out.element_p do
+                  output_doccomment_blocktag(out, see_comment)
+		end
+	      end
 	    end
 	  end
 	end
@@ -894,3 +971,5 @@
     index_files(type_agregator)
   end
 end
+
+# vim:softtabstop=2:shiftwidth=2
CVSspam 0.2.11
From erixtekila at dotgeek.org Sat May 14 18:19:29 2005 From: erixtekila at dotgeek.org (erixtekila) Date: Sat, 14 May 2005 20:19:29 +0200 Subject: [as2api-dev] [CVS trunk] Rewrite of doc-comment parser in a more flexible form. Message-ID: <0fc10236d19599a41cb23d949c2fb936@dotgeek.org> --Apple-Mail-7-349158656 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi, Nice to see the project is still alive. One question, i get this error in the output : @see tag didn't handle extra line "" Unknown block tag @author Unknown block tag @version Does that mean that you'll handle that information later ? Do you remember also, you provided a patch file to enable dot generation files and png. I still have that file. Can I apply it again with the new version ? --Apple-Mail-7-349158656 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="package_diagrams-patch.diff" Content-Disposition: attachment; filename=package_diagrams-patch.diff Index: html_output.rb =================================================================== --- html_output.rb (revision 73) +++ html_output.rb (working copy) @@ -2,6 +2,7 @@ require 'xmlwriter' require 'xhtmlwriter' require 'doc_comment' +require 'rexml/document' def link_type_proxy(out, type_proxy, qualified=false) if type_proxy.resolved? && type_proxy.resolved_type.document? @@ -537,6 +538,7 @@ def package_pages(package) in_subdir(package_dir_for(package)) do + package_diagrams(package) package_index(package) package_frame(package) end @@ -588,6 +590,42 @@ end end end + if FileTest.exists?(File.join($path, "package-classes.png")) + out.element_h1("Class Inheritance Diagram") + out.element_div("class"=>"diagram") do + if FileTest.exists?(File.join($path, "package-classes.cmapx")) + map = true + File.open(File.join($path, "package-classes.cmapx")) do |io| + copy_xml(io, out.xml) + end + else + map = false + end + attr = {"src"=>"package-classes.png"} + if map + attr["usemap"] = "class_diagram" + end + out.element_img(attr) + end + end + if FileTest.exists?(File.join($path, "package-interfaces.png")) + out.element_h1("Interface Inheritance Diagram") + out.element_div("class"=>"diagram") do + if FileTest.exists?(File.join($path, "package-interfaces.cmapx")) + map = true + File.open(File.join($path, "package-interfaces.cmapx")) do |io| + copy_xml(io, out.xml) + end + else + map = false + end + attr = {"src"=>"package-interfaces.png"} + if map + attr["usemap"] = "interface_diagram" + end + out.element_img(attr) + end + end package_navigation(out) end end @@ -637,6 +675,93 @@ end end +def package_diagrams(package) + asclasses = package.classes + unless asclasses.empty? + write_file("classes.dot") do |io| + io.puts("strict digraph class_diagram {") + io.puts(" rankdir=LR;") + asclasses.each do |astype| + io.puts(" #{astype.unqualified_name}[") + io.puts(" label=\"#{astype.unqualified_name}\",") + io.puts(" URL=\"#{astype.unqualified_name}.html\",") + io.puts(" tooltip=\"#{astype.qualified_name}\",") + io.puts(" fontname=\"Times-Italic\",") if astype.is_a?(ASInterface) + io.puts(" shape=\"record\"") + io.puts(" ];") + end + asclasses.each do |astype| + parent = astype.extends + if !parent.nil? && parent.resolved? + if parent.resolved_type.package_name == package.name + io.puts(" #{parent.resolved_type.unqualified_name} -> #{astype.unqualified_name};") + end + end + end + io.puts("}") + end + system("dot", "-Tpng", "-o", File.join($path, "package-classes.png"), File.join($path, "classes.dot")) + system("dot", "-Tcmapx", "-o", File.join($path, "package-classes.cmapx"), File.join($path, "classes.dot")) + #File.delete(File.join($path, "types.dot")) + end + + asinterfaces = package.interfaces + unless asinterfaces.empty? + write_file("interfaces.dot") do |io| + io.puts("strict digraph interface_diagram {") + io.puts(" rankdir=LR;") + asinterfaces.each do |astype| + io.puts(" #{astype.unqualified_name}[") + io.puts(" label=\"#{astype.unqualified_name}\",") + io.puts(" URL=\"#{astype.unqualified_name}.html\",") + io.puts(" tooltip=\"#{astype.qualified_name}\",") + io.puts(" fontname=\"Times-Italic\",") if astype.is_a?(ASInterface) + io.puts(" shape=\"record\"") + io.puts(" ];") + end + asinterfaces.each do |astype| + parent = astype.extends + if !parent.nil? && parent.resolved? + if parent.resolved_type.package_name == package.name + io.puts(" #{parent.resolved_type.unqualified_name} -> #{astype.unqualified_name};") + end + end + end + io.puts("}") + end + system("dot", "-Tpng", "-o", File.join($path, "package-interfaces.png"), File.join($path, "interfaces.dot")) + system("dot", "-Tcmapx", "-o", File.join($path, "package-interfaces.cmapx"), File.join($path, "interfaces.dot")) + #File.delete(File.join($path, "types.dot")) + end +end + +class XMLAdapter + def initialize(out) + @out = out + end + + def tag_start(name, attrs) + attr_map = {} + attrs.each do |el| + attr_map[el[0]] = el[1] + end + @out.start_tag(name, attr_map) + end + + def tag_end(name) + @out.end_tag(name) + end + + def text(text) + @out.pcdata(text) + end +end + +def copy_xml(io, out) + listener = XMLAdapter.new(out) + REXML::Document.parse_stream(io, listener) +end + def overview_navigation(out) out.element_div("class"=>"main_nav") do out.element_span("Overview", {"class"=>"nav_current"}) @@ -894,3 +1019,4 @@ index_files(type_agregator) end end + --Apple-Mail-7-349158656 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed One more thing, you parsing is really faster now, great ! Wish to hear from you soon. Cheers. ----------- erixtekila http://blog.v-i-a.net/ --Apple-Mail-7-349158656-- From dave at badgers-in-foil.co.uk Sun May 15 16:51:54 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 15 May 2005 16:51:54 +0000 Subject: [as2api-dev] [CVS trunk] Rewrite of doc-comment parser in a more flexible form. In-Reply-To: <0fc10236d19599a41cb23d949c2fb936@dotgeek.org> References: <0fc10236d19599a41cb23d949c2fb936@dotgeek.org> Message-ID: <20050515165154.GC28366@vhost.badgers-in-foil.co.uk> --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, May 14, 2005 at 08:19:29PM +0200, erixtekila wrote: > Nice to see the project is still alive. Only just -- I don't actually do all that much AS programming, you see ;) > One question, i get this error in the output : > @see tag didn't handle extra line "" That messsage is a reminder that I need to fix class SeeParser, as it only actually deals with the first line of input. Mostly harmless. > Unknown block tag @author > Unknown block tag @version The old implementation didn't know about these either, but the newer parser is at least smart enough to warn you that these tags aren't handled yet. > Does that mean that you'll handle that information later ? Yep. > Do you remember also, you provided a patch file to enable dot > generation files and png. > I still have that file. > Can I apply it again with the new version ? The only part of the patch that wasn't applying for me was a whitespace change. Attached is a version updated to apply against the latest html_output.rb > One more thing, you parsing is really faster now, great ! I'm surprised! I hadn't focused on performace at all -- cool ;) -- http://david.holroyd.me.uk/ --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="package_diagrams-patch.diff" Index: html_output.rb =================================================================== --- html_output.rb (revision 75) +++ html_output.rb (working copy) @@ -2,6 +2,7 @@ require 'xmlwriter' require 'xhtmlwriter' require 'doc_comment' +require 'rexml/document' def link_type_proxy(out, type_proxy, qualified=false) if type_proxy.resolved? && type_proxy.resolved_type.document? @@ -614,6 +615,7 @@ def package_pages(package) in_subdir(package_dir_for(package)) do + package_diagrams(package) package_index(package) package_frame(package) end @@ -665,6 +667,42 @@ end end end + if FileTest.exists?(File.join($path, "package-classes.png")) + out.element_h1("Class Inheritance Diagram") + out.element_div("class"=>"diagram") do + if FileTest.exists?(File.join($path, "package-classes.cmapx")) + map = true + File.open(File.join($path, "package-classes.cmapx")) do |io| + copy_xml(io, out.xml) + end + else + map = false + end + attr = {"src"=>"package-classes.png"} + if map + attr["usemap"] = "class_diagram" + end + out.element_img(attr) + end + end + if FileTest.exists?(File.join($path, "package-interfaces.png")) + out.element_h1("Interface Inheritance Diagram") + out.element_div("class"=>"diagram") do + if FileTest.exists?(File.join($path, "package-interfaces.cmapx")) + map = true + File.open(File.join($path, "package-interfaces.cmapx")) do |io| + copy_xml(io, out.xml) + end + else + map = false + end + attr = {"src"=>"package-interfaces.png"} + if map + attr["usemap"] = "interface_diagram" + end + out.element_img(attr) + end + end package_navigation(out) end end @@ -714,6 +752,93 @@ end end +def package_diagrams(package) + asclasses = package.classes + unless asclasses.empty? + write_file("classes.dot") do |io| + io.puts("strict digraph class_diagram {") + io.puts(" rankdir=LR;") + asclasses.each do |astype| + io.puts(" #{astype.unqualified_name}[") + io.puts(" label=\"#{astype.unqualified_name}\",") + io.puts(" URL=\"#{astype.unqualified_name}.html\",") + io.puts(" tooltip=\"#{astype.qualified_name}\",") + io.puts(" fontname=\"Times-Italic\",") if astype.is_a?(ASInterface) + io.puts(" shape=\"record\"") + io.puts(" ];") + end + asclasses.each do |astype| + parent = astype.extends + if !parent.nil? && parent.resolved? + if parent.resolved_type.package_name == package.name + io.puts(" #{parent.resolved_type.unqualified_name} -> #{astype.unqualified_name};") + end + end + end + io.puts("}") + end + system("dot", "-Tpng", "-o", File.join($path, "package-classes.png"), File.join($path, "classes.dot")) + system("dot", "-Tcmapx", "-o", File.join($path, "package-classes.cmapx"), File.join($path, "classes.dot")) + #File.delete(File.join($path, "types.dot")) + end + + asinterfaces = package.interfaces + unless asinterfaces.empty? + write_file("interfaces.dot") do |io| + io.puts("strict digraph interface_diagram {") + io.puts(" rankdir=LR;") + asinterfaces.each do |astype| + io.puts(" #{astype.unqualified_name}[") + io.puts(" label=\"#{astype.unqualified_name}\",") + io.puts(" URL=\"#{astype.unqualified_name}.html\",") + io.puts(" tooltip=\"#{astype.qualified_name}\",") + io.puts(" fontname=\"Times-Italic\",") if astype.is_a?(ASInterface) + io.puts(" shape=\"record\"") + io.puts(" ];") + end + asinterfaces.each do |astype| + parent = astype.extends + if !parent.nil? && parent.resolved? + if parent.resolved_type.package_name == package.name + io.puts(" #{parent.resolved_type.unqualified_name} -> #{astype.unqualified_name};") + end + end + end + io.puts("}") + end + system("dot", "-Tpng", "-o", File.join($path, "package-interfaces.png"), File.join($path, "interfaces.dot")) + system("dot", "-Tcmapx", "-o", File.join($path, "package-interfaces.cmapx"), File.join($path, "interfaces.dot")) + #File.delete(File.join($path, "types.dot")) + end +end + +class XMLAdapter + def initialize(out) + @out = out + end + + def tag_start(name, attrs) + attr_map = {} + attrs.each do |el| + attr_map[el[0]] = el[1] + end + @out.start_tag(name, attr_map) + end + + def tag_end(name) + @out.end_tag(name) + end + + def text(text) + @out.pcdata(text) + end +end + +def copy_xml(io, out) + listener = XMLAdapter.new(out) + REXML::Document.parse_stream(io, listener) +end + def overview_navigation(out) out.element_div("class"=>"main_nav") do out.element_span("Overview", {"class"=>"nav_current"}) --jI8keyz6grp/JLjh-- From Byron Saltysiak Sat May 21 17:55:59 2005 From: Byron Saltysiak (Byron Saltysiak) Date: Sat, 21 May 2005 13:55:59 -0400 Subject: [as2api-dev] Command line options Message-ID: <787687ba0505211055104f734c@mail.gmail.com> Is anyone out there working on additional command line options for as2api? For instance I'd like to be able to specify and output directory. If not I'll take up that torch, first I'll have to learn some Ruby though ;= ) Great product everyone - I'm actually redistributing it as part of a Maven plugin that I'm working on. --=20 Byron http://byron.saltysiak.com From dave at badgers-in-foil.co.uk Sat May 21 21:53:45 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 21 May 2005 21:53:45 +0000 Subject: [as2api-dev] Command line options In-Reply-To: <787687ba0505211055104f734c@mail.gmail.com> References: <787687ba0505211055104f734c@mail.gmail.com> Message-ID: <20050521215345.GA26622@vhost.badgers-in-foil.co.uk> On Sat, May 21, 2005 at 01:55:59PM -0400, Byron Saltysiak wrote: > Is anyone out there working on additional command line options for > as2api? For instance I'd like to be able to specify and output > directory. The user interfaces to as2api are all *really* basic. I don't know of any immediate plans to work on this, so be all means, go ahead! > If not I'll take up that torch, first I'll have to learn some Ruby though ;) I think getoptlong is the thing to use. Here are a couple of references... http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_standard.html#File.syscopy http://www.ruby-doc.org/stdlib/libdoc/getoptlong/rdoc/index.html > Great product everyone - I'm actually redistributing it as part of a > Maven plugin that I'm working on. Cool! I might just end up using that myself, if I get the chance to set up Maven at work in a few weeks. dave -- http://david.holroyd.me.uk/ From Byron Saltysiak Sun May 22 12:46:25 2005 From: Byron Saltysiak (Byron Saltysiak) Date: Sun, 22 May 2005 08:46:25 -0400 Subject: [as2api-dev] Command line options In-Reply-To: <20050521215345.GA26622@vhost.badgers-in-foil.co.uk> References: <787687ba0505211055104f734c@mail.gmail.com> <20050521215345.GA26622@vhost.badgers-in-foil.co.uk> Message-ID: <787687ba05052205464868fa83@mail.gmail.com> On 5/21/05, David Holroyd wrote: > > If not I'll take up that torch, first I'll have to learn some Ruby thou= gh ;) >=20 > I think getoptlong is the thing to use. Here are a couple of references.= .. >=20 > http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_standard.html#File.= syscopy > http://www.ruby-doc.org/stdlib/libdoc/getoptlong/rdoc/index.html >=20 Thanks for the links. I got Dave Thomas's book too, so I should be able to pull this off ;) =20 > Cool! I might just end up using that myself, if I get the chance to set > up Maven at work in a few weeks. That would be great - let me know if you need any help setting it up. The official site now is: http://maven-plugins.sourceforge.net/maven-flash-plugin/index.html I'll be testing more today from a windows machine (currently I just have it working on my linux box) and I'll be posting any usage notes or how-tos on by blog. --=20 Byron http://byron.saltysiak.com/ From Byron Saltysiak Sun May 22 14:29:20 2005 From: Byron Saltysiak (Byron Saltysiak) Date: Sun, 22 May 2005 10:29:20 -0400 Subject: [as2api-dev] version compliance Message-ID: <787687ba050522072963742d27@mail.gmail.com> What is the oldest version of Ruby that as2api works on? (I want to add this to my documentation.) --=20 Byron http://byron.saltysiak.com From phil at produxion.net Sun May 22 14:50:51 2005 From: phil at produxion.net (Phil Powell) Date: Sun, 22 May 2005 15:50:51 +0100 Subject: [as2api-dev] version compliance In-Reply-To: <787687ba050522072963742d27@mail.gmail.com> References: <787687ba050522072963742d27@mail.gmail.com> Message-ID: <1ea324dedc36b148ba7110669b3dc308@produxion.net> Hi Byron, Slightly grey area this. When we were doing early testing, it was 1.6 compatible (which was the version I was running under OS X), but I've since upgraded to 1.8 and not aware of any recent testing under 1.6. I'd say 1.8 is a sensible 'safe' version. -Phil On 22 May 2005, at 3:29 pm, Byron Saltysiak wrote: > What is the oldest version of Ruby that as2api works on? (I want to > add this to my documentation.) > > > -- > Byron > http://byron.saltysiak.com > > _______________________________________________ > as2api-dev mailing list > as2api-dev@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/as2api-dev > > From dave at badgers-in-foil.co.uk Mon May 23 07:42:47 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 23 May 2005 07:42:47 +0000 Subject: [as2api-dev] version compliance In-Reply-To: <1ea324dedc36b148ba7110669b3dc308@produxion.net> References: <787687ba050522072963742d27@mail.gmail.com> <1ea324dedc36b148ba7110669b3dc308@produxion.net> Message-ID: <20050523074247.GA23732@vhost.badgers-in-foil.co.uk> On Sun, May 22, 2005 at 03:50:51PM +0100, Phil Powell wrote: > I'd say 1.8 is a sensible 'safe' version. Agreed. I spend any dev time with Ruby 1.8. I'd probably be happy to fix issues with 1.6 compatability, as people point them out, though. dave -- http://david.holroyd.me.uk/ From Byron Saltysiak Tue May 24 11:17:27 2005 From: Byron Saltysiak (Byron Saltysiak) Date: Tue, 24 May 2005 07:17:27 -0400 Subject: [as2api-dev] adding classpaths Message-ID: <787687ba050524041752b3727c@mail.gmail.com> Is there a way to add classpaths? I'd like to have the MM Classes folder on the path and any third party packages so that my members and extending classes are more complete, but I don't want to mix these packages into my docs. Does that make sense? --=20 Byron http://byron.saltysiak.com From dave at badgers-in-foil.co.uk Tue May 24 12:30:21 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 24 May 2005 12:30:21 +0000 Subject: [as2api-dev] adding classpaths In-Reply-To: <787687ba050524041752b3727c@mail.gmail.com> References: <787687ba050524041752b3727c@mail.gmail.com> Message-ID: <20050524123021.GB13993@vhost.badgers-in-foil.co.uk> On Tue, May 24, 2005 at 07:17:27AM -0400, Byron Saltysiak wrote: > Is there a way to add classpaths? > > I'd like to have the MM Classes folder on the path and any third party > packages so that my members and extending classes are more complete, > but I don't want to mix these packages into my docs. > > Does that make sense? It does make sense, and I did give it a little thought, but the implementation isn't there yet: With javadoc, you can use the -link option to point to the location of some javadocs hosted elsewhere. The javadoc tool then: - Uses the class files for the external libs to work out what the package structure is (otherwise it can't know what 'import pkg.*' really means) - Retrieves the 'package-list' file from the URL given to -link and then synthesizes links to the to classes/methods in the listed packages as2api already creates the package-list file, but it doesn't download it, bacause there's currently no facility for parsing .as files and not generating docs for them. I guess that AS2 'intrinsic' definitions can perform a somewhat similar role for as2api as compiled class files perform for JavaDoc (but that's based on my not understanding Flash very well ;) dave -- http://david.holroyd.me.uk/ From Byron Saltysiak Tue May 24 13:10:30 2005 From: Byron Saltysiak (Byron Saltysiak) Date: Tue, 24 May 2005 09:10:30 -0400 Subject: [as2api-dev] adding classpaths In-Reply-To: <20050524123021.GB13993@vhost.badgers-in-foil.co.uk> References: <787687ba050524041752b3727c@mail.gmail.com> <20050524123021.GB13993@vhost.badgers-in-foil.co.uk> Message-ID: <787687ba050524061054a91787@mail.gmail.com> > as2api already creates the package-list file, but it doesn't download > it, bacause there's currently no facility for parsing .as files and not > generating docs for them. In order for compilation to work in Flash you actually need to have the source .as files locally so I'm not concerned about adding any url linking. I'd be happy if I could see what methods and attributes my classes have inherited from each of the parents. Would it be difficult to add optional paths that are used for this purpose but no docs are generated? It looks like I have date with Ruby in my near future. --=20 Byron http://byron.saltysiak.com From Rostislav Hristov Mon May 30 20:52:27 2005 From: Rostislav Hristov (Rostislav Hristov) Date: Mon, 30 May 2005 23:52:27 +0300 Subject: [as2api-dev] About as2api and EnFlash Message-ID: <435de143050530135233324701@mail.gmail.com> Hi David, thank you once again for this wonderful tool. I'm digging inside it the last two week and I've made a number of customizations. I wrote something about my story with as2api at http://www.asual.com/blog/page/actionscript/2005/05/30/documenting-with-as2= api.html. There you can find my changes and I'll be happy if you find them useful. The current CSS follows our style, but I can easily prepare a standart JavaDoc look and feel. Cheers, Rostislav From dave at badgers-in-foil.co.uk Tue May 31 12:47:10 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 31 May 2005 12:47:10 +0000 Subject: [as2api-dev] About as2api and EnFlash In-Reply-To: <435de143050530135233324701@mail.gmail.com> References: <435de143050530135233324701@mail.gmail.com> Message-ID: <20050531124709.GA29584@vhost.badgers-in-foil.co.uk> Hi there, On Mon, May 30, 2005 at 11:52:27PM +0300, Rostislav Hristov wrote: > thank you once again for this wonderful tool. I'm digging inside it > the last two week and I've made a number of customizations. I wrote > something about my story with as2api at > http://www.asual.com/blog/page/actionscript/2005/05/30/documenting-with-as2api.html. > There you can find my changes and I'll be happy if you find them > useful. The current CSS follows our style, but I can easily prepare a > standart JavaDoc look and feel. I downloaded your modified sources, and ran a diff to see the changes. I don't have time to look through in detail yet, but attach the patch in case anyone else is enterested. On having a quick skim though, I see a few bits where you've hardcoded things specific to your project (which was necessary, as they're things that aren't configurable). So, when I get the time, I'll work though and cherry pick the bits I like ;) Many thanks for sharing your hard work! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Tue May 31 12:49:11 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 31 May 2005 12:49:11 +0000 Subject: [as2api-dev] About as2api and EnFlash In-Reply-To: <20050531124709.GA29584@vhost.badgers-in-foil.co.uk> References: <435de143050530135233324701@mail.gmail.com> <20050531124709.GA29584@vhost.badgers-in-foil.co.uk> Message-ID: <20050531124911.GB29584@vhost.badgers-in-foil.co.uk> --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 31, 2005 at 12:47:10PM +0000, David Holroyd wrote: > I don't have time to look through in detail yet, but attach the patch in > case anyone else is enterested. Doh... --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="as2api-rostislav_hristov.patch" diff -uw as2api/api_model.rb as2api.rostislav_hristov/api_model.rb --- as2api/api_model.rb 2005-01-02 02:09:59.000000000 +0000 +++ as2api.rostislav_hristov/api_model.rb 2005-05-24 20:06:50.000000000 +0100 @@ -68,6 +68,11 @@ end end + def has_ancestor + parent = @extends + return !parent.nil? && parent.resolved? + end + # The whole type name, including package-prefix def qualified_name if @package_name == "" @@ -230,7 +235,7 @@ @args end - def agument(index) + def argument(index) @args[index] end end diff -uw as2api/as2api-documentation.xml as2api.rostislav_hristov/as2api-documentation.xml --- as2api/as2api-documentation.xml 2005-03-05 20:31:49.000000000 +0000 +++ as2api.rostislav_hristov/as2api-documentation.xml 2005-05-10 16:38:00.000000000 +0100 @@ -1,7 +1,4 @@ - - diff -uw as2api/html_output.rb as2api.rostislav_hristov/html_output.rb --- as2api/html_output.rb 2005-05-15 17:52:53.000000000 +0100 +++ as2api.rostislav_hristov/html_output.rb 2005-05-30 20:14:48.000000000 +0100 @@ -127,11 +127,19 @@ def class_navigation(out) - out.element_div("class"=>"main_nav") do - out.element_a("Overview", {"href"=>base_path("overview-summary.html")}) - out.element_a("Package", {"href"=>"package-summary.html"}) - out.element_span("Class", {"class"=>"nav_current"}) - out.element_a("Index", {"href"=>base_path("index-files/index.html")}) + out.element_div("class"=>"nav") do + out.element_a({"href"=>base_path("overview-summary.html")}) do + out.element_span("Overview") + end + out.element_a({"href"=>"package-summary.html"}) do + out.element_span("Package") + end + out.element_span({"class"=>"current"}) do + out.element_span("Class") + end + out.element_a({"href"=>base_path("index-files/index.html")}) do + out.element_span("Index") + end end end @@ -186,13 +194,14 @@ css_class = "method_details" css_class << " alt_row" if alt_row out.element_div("class"=>css_class) do - out.element_a("name"=>"method_#{method.name}") + out.element_a("", "id"=>"method_#{method.name}") out.element_h3(method.name) method_synopsis(out, method) if method.comment out.element_blockquote do comment_data = method.comment output_doccomment_blocktag(out, comment_data[0]) + if comment_has_params?(comment_data) || !comment_find_return(comment_data).nil? || comment_has_exceptions?(comment_data) || comment_has_seealso?(comment_data) out.element_dl("class"=>"method_additional_info") do # TODO: assumes that params named in docs match formal arguments # should really filter out those that don't match before this @@ -200,19 +209,13 @@ if comment_has_params?(comment_data) out.element_dt("Parameters") out.element_dd do - out.element_table("class"=>"arguments", "summary"=>"") do method.arguments.each do |arg| desc = comment_find_param(comment_data, arg.name) if desc - out.element_tr do - out.element_td do out.element_code(arg.name) - end - out.element_td do + out.pcdata(" - ") output_doccomment_blocktag(out, desc) - end - end - end + out.element_br end end end @@ -225,19 +228,13 @@ end end if comment_has_exceptions?(comment_data) - out.element_dt("throws") + out.element_dt("Throws") out.element_dd do - out.element_table("class"=>"exceptions", "summary"=>"") do comment_each_exception(comment_data) do |exception_comment| - out.element_tr do - out.element_td do - link_type_proxy(out, exception_comment.exception_type) - end - out.element_td do + out.element_code(link_type_proxy(out, exception_comment.exception_type)) + out.pcdata(" - ") output_doccomment_blocktag(out, exception_comment) - end - end - end + out.element_br end end end @@ -256,6 +253,7 @@ end end end +end def output_doccomment_blocktag(out, block) block.each_inline do |inline| @@ -274,16 +272,18 @@ end def document_field(out, type, field) - out.element_a("name"=>"field_#{field.name}") + out.element_a("", "id"=>"field_#{field.name}") out.element_h3(field.name) out.element_div("class"=>"field_details") do field_synopsis(out, field) if field.comment out.element_blockquote do comment_data = field.comment + out.element_p do output_doccomment_blocktag(out, comment_data[0]) - out.element_dl("class"=>"field_additional_info") do + end if comment_has_seealso?(comment_data) + out.element_dl("class"=>"field_additional_info") do out.element_dt("See Also") out.element_dd do comment_each_seealso(comment_data) do |see_comment| @@ -339,17 +339,31 @@ def html_file(name, title, encoding=nil) write_file("#{name}.html") do |io| out = XHTMLWriter.new(XMLWriter.new(io)) - encoding = "iso-8859-1" if encoding.nil? + encoding = "utf-8" if encoding.nil? out.pi("xml version=\"1.0\" encoding=\"#{encoding}\"") - out.element_html do + if name == "index" + out.doctype("html", "PUBLIC", "-//W3C//DTD XHTML 1.0 Frameset//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd") + else + out.doctype("html", "PUBLIC", "-//W3C//DTD XHTML 1.0 Transitional//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd") + end + out.element_html("xmlns"=>"http://www.w3.org/1999/xhtml", "xml:lang"=>"en") do out.element_head do - out.element_title(title) + out.element_title("EnFlash 0.4 Documentation") #hardcoded string out.element_link("rel"=>"stylesheet", "type"=>"text/css", "href"=>base_path("style.css")) out.element_meta("name"=>"generator", "content"=>"http://www.badgers-in-foil.co.uk/projects/as2api/") - yield out + if name == "overview-frame" + out.element_base("target"=>"current_package_frame") end + if name == "package-frame" + out.element_base("target"=>"type_frame") + end + if name == "all-types-frame" + out.element_base("target"=>"type_frame") + end + end + yield out end end end @@ -365,7 +379,13 @@ def footer(out) out.element_div("class"=>"footer") do - out.element_a("as2api", {"href"=>"http://www.badgers-in-foil.co.uk/projects/as2api/", "title"=>"ActionScript 2 API Documentation Generator"}) + out.element_p("© 2004-2005 Asual DZZD") #hardcoded string + out.element_p do + out.element_span do + out.pcdata("Documentation generated with ") + out.element_a("as2api", {"href"=>"http://www.badgers-in-foil.co.uk/projects/as2api/", "title"=>"ActionScript 2 API Documentation Generator", "target"=>"_blank"}) + end + end end end @@ -407,9 +427,10 @@ end def field_index_list(out, type) - out.element_div("class"=>"field_index") do + out.element_div do out.element_h2("Field Index") list_fields(out, type) + if type.has_ancestor out.element_dl do type.each_ancestor do |type| if type.fields? @@ -425,6 +446,7 @@ end end end +end def document_member?(member) !member.access.private? @@ -446,20 +468,23 @@ end def field_detail_list(out, type) - out.element_div("class"=>"field_detail_list") do + out.element_div do out.element_h2("Field Detail") + count = 0 type.each_field do |field| + count += 1 document_field(out, type, field) if document_member?(field) + out.element_hr if document_member?(field) && count < type.fields.length end end end def method_index_list(out, type) - out.element_div("class"=>"method_index") do + out.element_div do out.element_h2("Method Index") if type.constructor? && document_member?(type.constructor) - out.element_p do + out.element_p("class"=>"constructor") do out.element_code do out.pcdata("new ") out.element_a("href"=>"#method_#{type.constructor.name}") do @@ -470,6 +495,7 @@ end known_method_names = [] list_methods(out, type, known_method_names) + if type.has_ancestor out.element_dl do type.each_ancestor do |type| if type.methods? @@ -485,6 +511,7 @@ end end end +end def list_methods(out, type, known_method_names, href_prefix="") methods = type.methods.select do |method| @@ -501,19 +528,20 @@ end def method_detail_list(out, type) - out.element_div("class"=>"method_detail_list") do + out.element_div do out.element_h2("Method Detail") count = 0 type.each_method do |method| next unless document_member?(method) document_method(out, type, method, count%2==0) count += 1 + out.element_hr if document_member?(method) && count < type.methods.length end end end def constructor_detail(out, type) - out.element_div("class"=>"constructor_detail_list") do + out.element_div do out.element_h2("Constructor Detail") document_method(out, type, type.constructor) end @@ -526,9 +554,13 @@ "iso-8859-1" end html_body(type.unqualified_name, type.qualified_name, encoding) do |out| + out.element_p do out.element_a("", {"href"=>"#skip_nav", "title"=>"Skip navigation"}) # accessability + end class_navigation(out) - out.element_a("", {"name"=>"skip_nav"}) + out.element_p do + out.element_a("", {"id"=>"skip_nav"}) + end if type.instance_of?(ASClass) out.element_h1("Class "+type.qualified_name) elsif type.instance_of?(ASInterface) @@ -552,13 +584,12 @@ out.element_div("class"=>"type_description") do if type.comment comment_data = type.comment - out.element_h2("Description") out.element_p do output_doccomment_blocktag(out, comment_data[0]) end - out.element_dl("class"=>"type_details") do if comment_has_seealso?(comment_data) + out.element_dl("class"=>"type_details") do out.element_dt("See Also") out.element_dd do comment_each_seealso(comment_data) do |see_comment| @@ -577,7 +608,6 @@ constructor_detail(out, type) if type.constructor? && document_member?(type.constructor) field_detail_list(out, type) if type.fields? method_detail_list(out, type) if type.methods? - class_navigation(out) end end @@ -604,11 +634,19 @@ end def package_navigation(out) - out.element_div("class"=>"main_nav") do - out.element_a("Overview", {"href"=>base_path("overview-summary.html")}) - out.element_span("Package", {"class"=>"nav_current"}) + out.element_div("class"=>"nav") do + out.element_a({"href"=>base_path("overview-summary.html")}) do + out.element_span("Overview") + end + out.element_span({"class"=>"current"}) do + out.element_span("Package") + end + out.element_span do out.element_span("Class") - out.element_a("Index", {"href"=>base_path("index-files/index.html")}) + end + out.element_a({"href"=>base_path("index-files/index.html")}) do + out.element_span("Index") + end end end @@ -621,26 +659,29 @@ def package_index(package) html_body("package-summary", "Package #{package_display_name_for(package)} API Documentation") do |out| + out.element_p do out.element_a("", {"href"=>"#skip_nav", "title"=>"Skip navigation"}) # accessability + end package_navigation(out) - out.element_a("", {"name"=>"skip_nav"}) + out.element_p do + out.element_a("", {"id"=>"skip_nav"}) + end out.element_h1("Package "+package_display_name_for(package)) interfaces = package.interfaces unless interfaces.empty? interfaces.sort! - out.element_table("class"=>"summary_list", "summary"=>"") do + out.element_table("class"=>"summary", "summary"=>"") do out.element_tr do - out.element_th("Interface Summary", {"colspan"=>"2"}) + out.element_th("Interface Summary") #, {"colspan"=>"2"} end interfaces.each do |type| out.element_tr do - out.element_td do out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html"}) end - out.element_td do + #out.element_td do # TODO: package description - end + #end end end end @@ -648,19 +689,18 @@ classes = package.classes unless classes.empty? classes.sort! - out.element_table("class"=>"summary_list", "summary"=>"") do + out.element_table("class"=>"summary", "summary"=>"") do out.element_tr do - out.element_th("Class Summary", {"colspan"=>"2"}) + out.element_th("Class Summary") end classes.each do |type| out.element_tr do - out.element_td do out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html"}) end - out.element_td do + #out.element_td do # TODO: package description - end + #end end end end @@ -672,23 +712,17 @@ def package_frame(package) html_file("package-frame", "Package #{package_display_name_for(package)} API Naviation") do |out| out.element_body do - # TODO: don't use - out.element_strong do - out.element_a(package_display_name_for(package), {"href"=>"package-summary.html", "target"=>"type_frame"}) + out.element_p({"class"=>"package_index"}) do + out.element_a(package_display_name_for(package), {"href"=>"package-summary.html"}) end interfaces = package.interfaces unless interfaces.empty? interfaces.sort! - out.element_table("class"=>"navigation_list") do - out.element_tr do - out.element_th("Interfaces") - end + out.element_h3("Interfaces") interfaces.each do |type| - out.element_tr do - - out.element_td do - out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html", "target"=>"type_frame", "title"=>type.qualified_name}) - end + out.element_ul do + out.element_li do + out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html", "title"=>type.qualified_name}) end end end @@ -696,16 +730,11 @@ classes = package.classes unless classes.empty? classes.sort! - out.element_table("class"=>"navigation_list") do - out.element_tr do - out.element_th("Classes") - end + out.element_h3("Classes") classes.each do |type| - out.element_tr do - - out.element_td do - out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html", "target"=>"type_frame", "title"=>type.qualified_name}) - end + out.element_ul do + out.element_li do + out.element_a(type.unqualified_name, {"href"=>type.unqualified_name+".html", "title"=>type.qualified_name}) end end end @@ -715,35 +744,46 @@ end def overview_navigation(out) - out.element_div("class"=>"main_nav") do - out.element_span("Overview", {"class"=>"nav_current"}) + out.element_div("class"=>"nav") do + out.element_span({"class"=>"current"}) do + out.element_span("Overview"); + end + out.element_span do out.element_span("Package") + end + out.element_span do out.element_span("Class") - out.element_a("Index", {"href"=>"index-files/index.html"}) + end + out.element_a({"href"=>"index-files/index.html"}) do + out.element_span("Index") + end end end def overview(type_agregator) html_body("overview-summary", "API Overview") do |out| + out.element_p do out.element_a("", {"href"=>"#skip_nav", "title"=>"Skip navigation"}) # accessability + end overview_navigation(out) - out.element_a("", {"name"=>"skip_nav"}) - out.element_h1("API Overview") - out.element_table("class"=>"summary_list", "summary"=>"") do + out.element_p do + out.element_a("", {"id"=>"skip_nav"}) + end + out.element_h1("EnFlash 0.4 API Overview") #hardcoded string + out.element_table("class"=>"summary", "summary"=>"") do out.element_tr do - out.element_th("Packages", {"colspan"=>"2"}) + out.element_th("Packages") end packages = type_agregator.packages.sort packages.each do |package| out.element_tr do - out.element_td do name = package_display_name_for(package) out.element_a(name, {"href"=>package_link_for(package, "package-summary.html")}) end - out.element_td do + #out.element_td do # TODO: package description - end + #end end end end @@ -754,25 +794,16 @@ def overview_frame(type_agregator) html_file("overview-frame", "API Overview") do |out| out.element_body do - out.element_table("class"=>"navigation_list") do - out.element_tr do - out.element_th("Packages") - end - out.element_tr do - - out.element_td do - out.element_a("(All Types)", {"href"=>"all-types-frame.html", "target"=>"current_package_frame"}) - end + out.element_h3("Packages") + out.element_ul do + out.element_li do + out.element_a("(All Types)", {"href"=>"all-types-frame.html"}) end packages = type_agregator.packages.sort packages.each do |package| - out.element_tr do - - out.element_td do + out.element_li do name = package_display_name_for(package) - - out.element_a(name, {"href"=>package_link_for(package, "package-frame.html"), "target"=>"current_package_frame", "title"=>name}) - end + out.element_a(name, {"href"=>package_link_for(package, "package-frame.html"), "title"=>name}) end end end @@ -796,10 +827,7 @@ def all_types_frame(type_agregator) html_file("all-types-frame", "as2api") do |out| out.element_body do - out.element_table("class"=>"navigation_list") do - out.element_tr do - out.element_th("All Types") - end + out.element_h3("All Types") types = type_agregator.types.sort do |a,b| cmp = a.unqualified_name.downcase <=> b.unqualified_name.downcase if cmp == 0 @@ -808,13 +836,12 @@ cmp end end + out.element_ul do types.each do |type| if type.document? href = type.qualified_name.gsub(/\./, "/") + ".html" - out.element_tr do - out.element_td do - out.element_a(type.unqualified_name, {"href"=>href, "title"=>type.qualified_name, "target"=>"type_frame"}) - end + out.element_li do + out.element_a(type.unqualified_name, {"href"=>href, "title"=>type.qualified_name}) end end end @@ -824,7 +851,7 @@ end def frameset - html_file("frameset", "as2api") do |out| + html_file("index", "as2api") do |out| out.element_frameset("cols"=>"20%,80%") do out.element_frameset("rows"=>"30%,70%") do out.element_frame("src"=>"overview-frame.html", @@ -837,12 +864,14 @@ out.element_frame("src"=>"overview-summary.html", "name"=>"type_frame", "title"=>"Package and type descriptions") - end out.element_noframes do + out.element_body do out.element_a("Non-frameset overview page", {"href"=>"overview-summary.html"}) end end end + end +end class IndexTerm def <=>(other) @@ -864,7 +893,7 @@ def link(out) link_type(out, @astype) out.pcdata(" in package ") - out.pcdata(@astype.package_name) + out.element_a(@astype.package_name, {"href"=>"../" + @astype.package_name.gsub(".", "/") + "/package-summary.html"}) end end @@ -902,11 +931,19 @@ end def index_navigation(out) - out.element_div("class"=>"main_nav") do - out.element_a("Overview", {"href"=>base_path("overview-summary.html")}) + out.element_div("class"=>"nav") do + out.element_a({"href"=>base_path("overview-summary.html")}) do + out.element_span("Overview") + end + out.element_span do out.element_span("Package") + end + out.element_span do out.element_span("Class") - out.element_span("Index", {"class"=>"nav_current"}) + end + out.element_span({"class"=>"current"}) do + out.element_span("Index") + end end end @@ -936,11 +973,13 @@ in_subdir("index-files") do html_file("index", "Alphabetical Index") do |out| index_navigation(out) + out.element_ul do index.each do |element| - out.element_p do + out.element_li do element.link(out) end end + end index_navigation(out) end end Common subdirectories: as2api/parse and as2api.rostislav_hristov/parse diff -uw as2api/style.css as2api.rostislav_hristov/style.css --- as2api/style.css 2005-01-12 00:06:17.000000000 +0000 +++ as2api.rostislav_hristov/style.css 2005-05-24 17:31:16.000000000 +0100 @@ -1,71 +1,147 @@ -h1, h2, h3, th { - font-family: sans-serif; +* { + margin: 0; + padding: 0; +} +body { + font: 76%/162% 'Lucida Sans Unicode', 'Lucida Grande', 'Bitstream Vera Sans', 'Trebuchet MS', Geneva, Arial, sans-serif; + color: #000000; + margin: 1em; + overflow: auto; +} +a { + color: #285090; + white-space: nowrap; +} +a:hover { + color: #A30000; +} +h1 { + color: #000000; + font-size: 180%; + font-weight: bold; + padding: 0; + margin: 1em 0; } - h2 { - background-color: #ccccff; - padding-left: .2em; - padding-right: .2em; - -moz-border-radius: .2em; -} - -.method_details, .field_details { - padding-bottom: .5em; -} -.alt_row { - background-color: #eeeeee; -} - -.main_nav { - background-color: #EEEEFF; - padding: 4px; + background-color: #285090; + color: #FFFFFF; + font-size: 130%; + font-weight: normal; + padding: 2px 4px 4px; + margin: 1em 0; +} +h3 { + font-size: 120%; + font-weight: normal; + margin: .4em 0; +} +dl { + margin: 1em 0 0 2em; +} +dt { + font-weight: bold; +} +dd { + margin: 0 0 0 1em; +} +li { + margin: 0 0 .4em 0; + list-style: none; +} +hr { + color: #285090; + background: #285090; + height: 1px; + border: 0; + margin: 1em 0 0 0; } -.main_nav > * { - font-family: sans-serif; - font-weight: bolder; - padding: 4px; +code, pre { + font-size: 120%; } -.nav_current { - background-color: #00008B; - color: #FFFFFF; +* html code, * html pre { + font-size: 100%; } - -table.summary_list { +table { border-collapse: collapse; width: 100%; - margin-bottom: 1em; + margin: 0 0 1em 0; } -table.summary_list th { - background-color: #CCCCFF; - font-size: larger; +th { + background-color: #D5DEED; + font-weight: normal; + font-size: 130%; } -table.summary_list td, table.summary_list th { - border: 2px solid grey; - padding: .2em; +th, td { + padding: 4px; + border: 1px solid #285090; +} +* html th { + font-size: 100%; } -table.navigation_list th { - text-align: left; +* html td { + font-size: 76%; } - -/* .unresolved_type_name { - background-color: red; - color: white; + color: #336600; } -*/ - -.interface_name { - font-style: italic; +.method_synopsis { + color: #285090; } - -.footer { - text-align: center; - font-size: smaller; +.constructor { + margin: 0 0 1em 0; } -/* -.read_write_only { +.package_index { + margin: 0 0 1em 0; + font-weight: bold; +} +.nav { + background-color: #D5DEED; + padding: 4px 2px; + margin: 0 0 1em 0; + font-weight: bold; +} +.nav span { + margin: 4px 2px; +} +.nav a { + color: #285090; + text-decoration: none; + padding: 1px 0; + margin: 4px 2px; +} +.nav a span { + margin: -2px 1px; + padding: 1px 4px; +} +.nav a:hover { + color: #FFFFFF; + background: #A30000; + padding: 1px 0; + border-top: 1px solid #C28A94; + border-bottom: 1px solid #C28A94; +} +.nav a:hover span { + border-top: 1px solid #A30000; + border-bottom: 1px solid #A30000; +} +.nav .current { + color: #FFFFFF; + background: #285090; + padding: 1px 0; + margin: 4px 2px; + border-top: 1px solid #B9C7DE; + border-bottom: 1px solid #B9C7DE; +} +.nav .current span { + margin: -2px 1px; + padding: 1px 4px; + border-top: 1px solid #285090; + border-bottom: 1px solid #285090; +} +.footer { + margin-top: 1.6em; + line-height: 140%; } -*/ -.diagram { - text-align: center; +.footer span { + font-size: 92%; } diff -uw as2api/xhtmlwriter.rb as2api.rostislav_hristov/xhtmlwriter.rb --- as2api/xhtmlwriter.rb 2005-03-13 13:52:33.000000000 +0000 +++ as2api.rostislav_hristov/xhtmlwriter.rb 2005-05-10 19:31:32.000000000 +0100 @@ -123,6 +123,10 @@ @io.pi(text) end + def doctype(name, syspub, public_id, system_id) + @io.doctype(name, syspub, public_id, system_id) + end + def comment(text) @io.comment(text) end diff -uw as2api/xmlwriter.rb as2api.rostislav_hristov/xmlwriter.rb --- as2api/xmlwriter.rb 2004-11-18 20:10:06.000000000 +0000 +++ as2api.rostislav_hristov/xmlwriter.rb 2005-05-13 11:09:12.000000000 +0100 @@ -3,10 +3,6 @@ @io = io end - def doctype(name, syspub, public_id, system_id) - @io.puts("") - end - def element(text, attrs=nil) start_tag(text, attrs) yield @@ -59,7 +55,8 @@ end def pcdata(text) - @io.print(text.gsub(/&/, '&').gsub(//, '>')) + # @io.print(text.gsub(/&/, '&').gsub(//, '>')) + @io.print(text) end def cdata(text) @@ -83,6 +80,10 @@ @io.print("?>") end + def doctype(name, syspub, public_id, system_id) + @io.print("") + end + private def chk_name(name) raise "bad character '#{$&}' in tag name #{name}" if name =~ /[<>& "']/ --mP3DRpeJDSE+ciuQ-- From phil at produxion.net Tue May 31 13:13:13 2005 From: phil at produxion.net (Phil Powell) Date: Tue, 31 May 2005 14:13:13 +0100 Subject: [as2api-dev] About as2api and EnFlash In-Reply-To: <435de143050530135233324701@mail.gmail.com> References: <435de143050530135233324701@mail.gmail.com> Message-ID: Great work - nice to see some XHTML compliance. Just as soon as I take delivery of my new G5 (next few weeks I hope) I'll be able to do some work on getting the OS X .dmg working with Tiger and enhancing the Mac GUI substantially with new code releases. -Phil On 30 May 2005, at 9:52 pm, Rostislav Hristov wrote: > Hi David, > > thank you once again for this wonderful tool. I'm digging inside it > the last two week and I've made a number of customizations. I wrote > something about my story with as2api at > http://www.asual.com/blog/page/actionscript/2005/05/30/documenting- > with-as2api.html. > There you can find my changes and I'll be happy if you find them > useful. The current CSS follows our style, but I can easily prepare a > standart JavaDoc look and feel. > > Cheers, > Rostislav > > _______________________________________________ > as2api-dev mailing list > as2api-dev@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/as2api-dev > > From erixtekila at dotgeek.org Tue May 31 16:38:28 2005 From: erixtekila at dotgeek.org (erixtekila) Date: Tue, 31 May 2005 18:38:28 +0200 Subject: [as2api-dev] OpenSource Flash projects site initiative Message-ID: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> Hey guys, Did you heard about : http://www.osflash.org/doku.php There are dedicated mailing-lists also. Shouldn't it be interesting to add as2api to this site? I think Flash still misses a popular opensource documentation tool=85 = and=20 as2api is soooo near ! ;=ACp What do you think ? ----------- erixtekila http://blog.v-i-a.net/ From phil at produxion.net Tue May 31 16:43:26 2005 From: phil at produxion.net (Phil Powell) Date: Tue, 31 May 2005 17:43:26 +0100 Subject: [as2api-dev] OpenSource Flash projects site initiative In-Reply-To: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> References: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> Message-ID: What a great little resource. I think it's definitely worth adding=20 as2api. Dave? On 31 May 2005, at 5:38 pm, erixtekila wrote: > Hey guys, > > > Did you heard about : > http://www.osflash.org/doku.php > > There are dedicated mailing-lists also. > > Shouldn't it be interesting to add as2api to this site? > I think Flash still misses a popular opensource documentation tool=85=20= > and as2api is soooo near ! ;=ACp > > What do you think ? > > ----------- > erixtekila > http://blog.v-i-a.net/ > > > > _______________________________________________ > as2api-dev mailing list > as2api-dev@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/as2api-dev > > From dave at badgers-in-foil.co.uk Tue May 31 17:01:44 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 31 May 2005 17:01:44 +0000 Subject: [as2api-dev] OpenSource Flash projects site initiative In-Reply-To: References: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> Message-ID: <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> On Tue, May 31, 2005 at 05:43:26PM +0100, Phil Powell wrote: > What a great little resource. I think it's definitely worth adding > as2api. Dave? JamesK pointed the site out to me this morning, and, well... as2api is already there (linked from the front page, even): http://www.osflash.org/doku.php?id=as2api Can anyone think of obvious stuff that should go on that page, but isn't there already? I think I might lurk on the mailing list for a bit to see what's-what (I have to admit that I unsubscribed from the chattyfig fire-hose -- it was just too much). dave -- http://david.holroyd.me.uk/ From phil at produxion.net Tue May 31 17:10:00 2005 From: phil at produxion.net (Phil Powell) Date: Tue, 31 May 2005 18:10:00 +0100 Subject: [as2api-dev] OpenSource Flash projects site initiative In-Reply-To: <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> References: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> Message-ID: <206c618fd589cbf6fa21df560306813b@produxion.net> Could add a link to the OS X distribution: http://www.philsgaff.co.uk/category/as2api/ Some day soon I'll be back on it... -Phil On 31 May 2005, at 6:01 pm, David Holroyd wrote: > On Tue, May 31, 2005 at 05:43:26PM +0100, Phil Powell wrote: >> What a great little resource. I think it's definitely worth adding >> as2api. Dave? > > JamesK pointed the site out to me this morning, and, well... as2api is > already there (linked from the front page, even): > > http://www.osflash.org/doku.php?id=as2api > > Can anyone think of obvious stuff that should go on that page, but > isn't > there already? > > I think I might lurk on the mailing list for a bit to see what's-what > (I > have to admit that I unsubscribed from the chattyfig fire-hose -- it > was > just too much). > > > dave > > -- > http://david.holroyd.me.uk/ > > _______________________________________________ > as2api-dev mailing list > as2api-dev@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/as2api-dev > > From Rostislav Hristov Tue May 31 17:11:16 2005 From: Rostislav Hristov (Rostislav Hristov) Date: Tue, 31 May 2005 20:11:16 +0300 Subject: [as2api-dev] OpenSource Flash projects site initiative In-Reply-To: <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> References: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> Message-ID: <435de14305053110113fef79b2@mail.gmail.com> Yes, as2api is already there... and a whole section for such documenting tools has to be created. The more we speak, the more things happen :) On 5/31/05, David Holroyd wrote: > On Tue, May 31, 2005 at 05:43:26PM +0100, Phil Powell wrote: > > What a great little resource. I think it's definitely worth adding > > as2api. Dave? >=20 > JamesK pointed the site out to me this morning, and, well... as2api is > already there (linked from the front page, even): >=20 > http://www.osflash.org/doku.php?id=3Das2api >=20 > Can anyone think of obvious stuff that should go on that page, but isn't > there already? >=20 > I think I might lurk on the mailing list for a bit to see what's-what (I > have to admit that I unsubscribed from the chattyfig fire-hose -- it was > just too much). >=20 >=20 > dave >=20 > -- > http://david.holroyd.me.uk/ >=20 > _______________________________________________ > as2api-dev mailing list > as2api-dev@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/as2api-dev > From dave at badgers-in-foil.co.uk Tue May 31 17:22:33 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 31 May 2005 17:22:33 +0000 Subject: [as2api-dev] OpenSource Flash projects site initiative In-Reply-To: <206c618fd589cbf6fa21df560306813b@produxion.net> References: <85c19685bf815c5cc7567d6653be8b35@dotgeek.org> <20050531170144.GD29584@vhost.badgers-in-foil.co.uk> <206c618fd589cbf6fa21df560306813b@produxion.net> Message-ID: <20050531172232.GA1062@vhost.badgers-in-foil.co.uk> On Tue, May 31, 2005 at 06:10:00PM +0100, Phil Powell wrote: > Could add a link to the OS X distribution: > > http://www.philsgaff.co.uk/category/as2api/ Done. > Some day soon I'll be back on it... I hope! ;) dave -- http://david.holroyd.me.uk/