0 Replies Latest reply on Nov 6, 2010 7:05 AM by Ondina D. F.

    FlashBuilder Burrito - metadata code completion (metadata.xml)

    Ondina D. F.




      I’ve already posted my question on the Flex Coders Yahoo Group, but I think Adobe Forums>Flash Builder>Using Flash Builder http://forums.adobe.com/http://forums.adobe.com/http://forums.adobe.com/ is more appropriate for this kind of questions. So, here is my problem:



      There is an actionscript framework called Robotlegs ( http://www.robotlegs.org/ ), which uses automated, metadata based Dependency Injection.

      The code for an injection could look like this:


      public var myDependency:Depedency; //unnamed injection



      or this:


      public var myNamedDependency:NamedDepedency; //named injection



      The new, great features in FlashBuilder Burrito allow us to create code templates.

      I can add a new pattern like this:


      public var ${ myDependency }:${ Depedency };




      "Flash Builder also supports metadata tags from third party SWCs if they have the required metadata.xml file embedded in them." (

      http://www.adobe.com/devnet/flex/articles/coding_enhancements_burrito.html#articlecontentA dobe_numberedheader_0 )


      Under \Adobe Flash Builder Burrito\sdks\4.5.0\frameworks there is a metadata.xml file.

      Following that example, I think that I could do something like this:



      <?xml version="1.0" encoding="utf-8"?>

      <annotations version="1.0">

      <metadata name="Inject" description=”the uber cool robotlegs Injection”>

      <context name="class" />

      <context name="variable" />

      <context name="method" />




      for a Field Injection, a Method Injection and a Constructor Injection in Robotlegs.





      How exactly should the metadata.xml file look like in order to get 


      public var myNamedDependency:NamedDepedency;


      in your code, meaning the [Inject] metadata tag and a template for the variable?



      I’d really appreciate your help.