Extending Flex Builder: sample code for design.xml

Thanks to everyone who came to David's and my talk at MAX today, Extending Flex Builder. I promised to post the sample code for the part of the talk which discussed design.xml.

So here it is. This ZIP file contains two projects:

  • MyLibrary is the main interesting part. It contains design.xml, a Flex manifest, and a sample component. See the slides (linked above) for an explanation of how all this stuff hooks together.
  • MyFlexProject is just a simple Flex Project that has MyLibrary on its library path, so that you can see that when you open the Flex project's main app in design view, the library's Calculator component shows up in the "Mike's stuff" folder of the Components view (as opposed to the default, the "Custom" folder), and that if you click on the calculator that is already in the document, the list of properties in the Properties view has been customized, with the "Layout:" property showing up there.

To reiterate, the sample by itself isn't quite enough -- you really need to see the slides (starting at slide #23) to understand the context. And, I will soon be writing an Adobe Developer Center article with much more detail.

15 Comments so far

  1. [...] Flex Builder Extensibility API Reference (blog post Mike Morearty) [...]

  2. venkat on December 21st, 2008

    Hello Mike. I am trying to build an eclipse plugin for flexbuilder that would simplify the process of unit testing projects using flexunit. However, the lack of documentation has been a problem with developing anything for flexbuilder. I have several questions related to extending flexbuilder that I could not find answers anywhere. The help inside flexbuilder itself is very limited. Is there any sort of documentation other than the one provided with flexbuilder itself?

  3. mike on December 21st, 2008

    Hi venkat, the documentation provided with Flex Builder (for the code model and the design model) is what there is.

  4. Patrick on January 8th, 2009

    In the design xml where you define the categories is it possible to nest them? For example I have my custom components (and I can get them to showup correctly as you outline above) but I would also like to be able to have branches for controls, containers, etc.

  5. mike on January 8th, 2009

    No, nesting (subcategories) is not supported.

  6. nick on January 30th, 2009

    Is there any place at all that I can find more information on design.xml? The only info I've been able to find on it after hours of searching is this site.

  7. mike on January 30th, 2009

    Nick, currently the only sources of information about design.xml are:

    • This site, including the presentation that I link to above, and
    • the actual talk David and I gave at MAX, which can be viewed here: http://tv.adobe.com/#vi+f15384v1080 (the part about design.xml starts at 28:30).
  8. nick on February 2nd, 2009

    Do you know where I can get some source code of existing inserterClass or designExtension class?

  9. nick on February 2nd, 2009

    Specifically, I want to find how the DataGrid can understand how it has columns in design view.
    I'm guessing the key is in here, but I can't find source for this or something similar. <designExtension class="zorn.extensions.mx.controls.DataGridExtension"/>

  10. mike on February 3rd, 2009

    No, Nick, I don't. The best place to ask this sort of thing is on the Flexcoders list on Yahoo Groups.

  11. nick on February 5th, 2009

    Do you know if there's a way to have design.xml be used if you're using compc instead of compiling with flex builder? I set include-file and design.xml is being included, but not used.

  12. nick on February 5th, 2009

    oops. I'm sorry, ignore these last two comments.
    My trouble was that in my compc call I had include-file and I also had include-file in the config xml it was loading. So the includes in the config xml were being ignored. Therefore the design.xml never actually made it to the swc.

  13. Dinesh on August 29th, 2011

    Hi Mike, Looks the documentation on Adobe Flash Builder Extensibility API Reference has not been updated:( ..i can give many examples …. Here is the DesignModelPlugin Class and getEditableModelForFile in flex 3 http://www.adobe.com/livedocs/flex/3/extensibility/DesignModel/com/adobe/flexbuilder/designmodel/DesignModelPlugin.html

    This method is removed in flex 4 but the document is not updated.Flex Builder doc link http://help.adobe.com/en_US/flashbuilder/extensibility/DesignModel/com/adobe/flexbuilder/designmodel/DesignModelPlugin.html

    Without the updated document i am not able to proceed my development. Actually i was migrating my plugins from flex builder to flash builder since some methods are removed i am not able to find alternate way to fix them for flashbuilder.Waiting for solution from you blog.

    Thanks in Advance dinesh

  14. mike on August 29th, 2011

    Hi Dinesh,

    I no longer work for Adobe, so unfortunately I can't help you with this issue. I suggest posting a message on the official Adobe forums.

  15. Dinesh on August 29th, 2011

    Hi Mike,

    Thanks alot for your reply.Even i posted to adobe till now i didn't get any response.Hope adobe will understand developers pain working in an organization and update soon with right doc.

    Thanks, Dinesh

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word