// you’re reading...

Featured

Quick tour of ASDoc support in Gumbo (Flex Builder 4)

Two ways to see ASDoc content in Gumbo

If you were lucky enough to be at MAX this year, and even luckier to see the “Looking ahead to Flex Builder 4″ session, then you saw me demo ASDoc support in the next version of Flex Builder, code-named “Gumbo”. For everyone else, this feature is way too cool (and useful) not to know about!  First, we’ll see how ASDoc is exposed in Gumbo, and then we’ll talk about a new SWC feature that lets us embed comments directly in the SWC.

Can you see me now?

For Gumbo, we display ASDoc content in three places:

  • Inline in code hints for MXML and ActionScript
  • When you hover over a definition/tag, or press F2
  • In the new ASDoc View

Code Hints
Now, when we show code hints, we also provide the ability to see the ASDoc comment associated with the specific entry that’s selected.  This works for any element in ActionScript or MXML that can have a comment, and is displayed next to the code hint window.  The payoff here is huge!  You don’t have to jump back and forth between code and help anymore…all the comments are right in front of you, and it makes it so much easier to dive into a new framework, or work in an existing one.

Info-Hovers
The info-hovers in Gumbo have been greatly enhanced to show ASDoc comments as well.  Now, any definition or tag you hover over will display its full ASDoc comment.  Even better, the ASDoc pop-up supports hyperlinks, so if the comment has any @see tags, you can jump directly to other comments referenced in the one you’re reading.  And like any good browser, you can browse backwards and forwards.  Oh, and code hints does this too.

The ASDoc Viewer
In addition to code hints and the info-hover, Gumbo also comes with an ASDoc Viewer.  Any time you click on a definition or tag that has an ASDoc comment in code view, the ASDoc Viewer will display that comment in full.  You can choose to have the viewer linked to your code, or to only open when you want it.

Wow, that SWC is fat!

In Flex 3, it’s was pretty easy to parse ASDoc comments from ActionScript and MXML source.  However, getting ASDoc from a SWC was completely impossible: the data just wasn’t there.  But with the new Gumbo framework, all of that is changing.  SWCs can now be packaged with ASDoc content that the next release of Flex Builder will know how to read.  This is how we’re providing ASDoc information for Flex 3 and Flex 4 in the preview release of Gumbo. Anyone who produces or distributes SWCs will be able to package their comments with their libraries, helping everyone who consumes those SWCs.

If you’re concerned about performance or overall SWF size, you have nothing to worry about.  While embedding ASDoc comments in a SWC will make it larger, it will not increase compile time or the final SWF size of your Flex app.  In fact, adding ASDoc to SWCs actually made our SWC reading a bit faster, but that’s a story for another time.  We’ll most likely add support in Flex Builder to produce these comment-including SWCs, as well as the ability to generate ASDoc…but like anything else, I can’t promise it if it’s not in the product already…I’d hate to make management angry

Well, I hope you like what you see, but this is just a small taste of what’s coming in the next release of Flex Builder.

Discussion

7 comments for “Quick tour of ASDoc support in Gumbo (Flex Builder 4)”

  1. Will documentation you generate be able to link to other SWC’s ASDoc’s? JavaDoc has something similar to this, and it makes it easier for users to navigate the dependencies in a framework.

    Dan

    Posted by Dan Schultz | November 21, 2008, 2:35 pm
  2. We designed the “Fat” SWC feature with this in mind, and I know it’s on our todo list.

    Posted by david.z | November 21, 2008, 2:38 pm
  3. Thanks David – this will be a great usability improvement and really useful for those of us creating Flex libraries and distributing swc files.

    I installed Flex Builder Gumbo MAX Preview but couldn’t figure out how to make our asdoc show up via the swc. After reading this blog it sounds like this isn’t possible (yet). Or is there some way currently for us to make this happen?

    Posted by Bjorn | November 25, 2008, 5:21 pm
  4. I’ll have to dig around, but you can do it from the command line. I’ll ping the Flex SDK guys and get back to you

    Posted by David Zuckerman | November 25, 2008, 5:24 pm
  5. [...] Zuckerman na swoim blogu przedstawi? sposób korzystania z ASDoc w Flex Builder 4 (Gumbo). Dokumentacja ASDoc w Gumbo b?dzie dost?pna na kilka sposób: inline (podpowiadanie sk?adni w [...]

    Posted by Polish Adobe Flex User Group » Blog Archive » ASDoc we Flex Builder 4 (Gumbo) | December 9, 2008, 4:01 am
  6. Very nice features but while cool, it’d be very wise of the team to look closer at the ASDoc tool itself. No matter the platform, it always craps on some stupid xsl file at the end of generating and your Top Level classes will be littered with empty functions making the docs hard to use. Given enough time, I could probably list 10 such bugs that I’ve stumbled upon from time to time.

    These bugs (present since Flex 2) and the fact that the link in this article goes to the single doc page there is on the Adobe site, kind of underlines that Documentation isn’t something Adobe tries to push other than for internal use. Please make sure that the ones working on this read the comments or we’ll have yet another buggy release? And while at it – why not make a small GUI so that non-unix devs can use this a little easier? Should improve the overall usage…

    J

    Posted by Jensa | January 7, 2009, 4:23 am
  7. Dear David,

    I’m working on a free tool called Flexplorer to explore the Properties, Styles and Events supported by Flex Components packaged as a .SWC file. I would like to understand where the ASDoc files will be kept in the SWC and how to compile them, so that I can display them inside the tool. Any help on this is much appreciated

    Regards,
    Arul

    Posted by arul | January 7, 2010, 3:56 am

Post a comment