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.
Comments(15)
[...] Flex Builder Extensibility API Reference (blog post Mike Morearty) [...]
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?
Hi venkat, the documentation provided with Flex Builder (for the code model and the design model) is what there is.
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.
No, nesting (subcategories) is not supported.
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.
Nick, currently the only sources of information about design.xml are:
Do you know where I can get some source code of existing inserterClass or designExtension class?
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"/>
No, Nick, I don't. The best place to ask this sort of thing is on the Flexcoders list on Yahoo Groups.
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.
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.
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
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.
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