FlashBuilder Burrito Code Templates [Inject]
FlashBuilder Burrito Code Templates [Inject]
Window > Preferences > FlashBuilder > Editors > Code Templates > ActionScript
Add: New Template
Name: xx (a name of your choice)
Pattern:
[Inject]
public var ${someVar}:${someType};
Save it.
In your code:
Content Assist (Ctrl + Space)
type xx ( the name that you’ve chosen)
And voilà! Your Inject metadata tag will be good to go!
There is also a Metadata code completion feature but it doesn’t show the RL Inject tag.
“Flash Builder also supports metadata tags from third party SWCs if they have the required metadata.xml file embedded in them.” (source http://www.adobe.com/devnet/flex/articles/coding_enhancements_burri...)
Ondina
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Shaun Smith on Nov 05, 2010 @ 02:59 PM
Hi Ondina,
I've only just installed Burrito, so need some time to check it out properly. The article you linked to makes no mention of how to build that metadata.xml file. Any idea?
Support Staff 2 Posted by Ondina D.F. on Nov 05, 2010 @ 04:23 PM
Hi Shaun,
if you look under
\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks
you’ll see a metadata.xml file, that contains the supported metadata tags.
I guess the custom metadata.xml file should follow that structure, but I have no idea about the right syntax for an Inject tag with a template for a variable
Maybe something like this?
(I don’t know how to edit xml in here, the code or pre tags don't work with xml? )
This way you’d probably get just the [Inject] tag without the
public var ${someValue}:${someType};
I could ask (over the weekend or next week) on the Flex Forum how to do that...
Ondina
3 Posted by Paul Robertson on Nov 08, 2010 @ 10:44 PM
This turned out to be pretty straightforward to add. Ondina's text file was pretty much spot-on. I've got this working in my fork of Robotlegs if you're interested:
https://github.com/probertson/robotlegs-framework/commit/08c8d55b5d...
One issue I ran into was that once I added the SWC to a project, I had to restart Flash Builder in order for the code hints to show up. I'm not sure if that's just an issue with my machine or a general bug, but in any case I filed a bug about it.
The documentation for adding the code hints is here (although it only tells how to package them, not the syntax for the xml file):
http://goo.gl/9h5Zx
Support Staff 4 Posted by Shaun Smith on Nov 08, 2010 @ 11:46 PM
Awesome! Thanks Ondina and Paul. I've merged those changes in, and they'll go out in the next release.
5 Posted by Nikos on Nov 09, 2010 @ 10:43 AM
im installing it now, any luck migrating fb4 projects?
Support Staff 6 Posted by Ondina D.F. on Nov 09, 2010 @ 11:05 AM
That’s great! Thanks, Paul and Shaun.
For those interested in FlashBuilder Burrito templates see Paul’s
http://probertson.com/articles/2010/10/25/flashbuilder-burrito-temp...
Paul, could you put the templates on github, so everyone can contribute with new patterns?
Cheers,
Ondina
Support Staff 7 Posted by Ondina D.F. on Nov 09, 2010 @ 11:06 AM
Hi Nikos,
I’ve migrated one of my projects from FB4 to Burrito successfully. No issues yet.
Ondina
8 Posted by Nikos on Nov 09, 2010 @ 11:21 AM
Cool, I take it you can't share workspaces?
Support Staff 9 Posted by Ondina D.F. on Nov 09, 2010 @ 11:32 AM
Obviously not possible:
Please note that using an existing Flash Builder 4 workspace with Flash Builder "Burrito" is not supported - you should use the default workspace created for you or define new workspaces using Flash Builder "Burrito". (http://labs.adobe.com/wiki/index.php/Flash_Builder_Burrito)
10 Posted by Nikos on Nov 09, 2010 @ 11:35 AM
yeah thought so thanks Ondina Robot :)
11 Posted by Paul Robertson on Nov 09, 2010 @ 04:40 PM
At Ondina's suggestion, I've posted my templates on GitHub:
https://github.com/probertson/FlashBuilder-templates
It's just the XML files for now. I'll try to add Readme files soon with more explanations.
12 Posted by jadd on Nov 09, 2010 @ 05:59 PM
Hi guys,
great usefull post for the RL comunity! How about a little step-by-step tutorial for us "mortals" Paul?
Thanks a lot, long live to RL!
13 Posted by Paul Robertson on Nov 09, 2010 @ 06:41 PM
To import the templates into Flash Builder Burrito:
Once you have the template imported, to use a template:
14 Posted by Nikos on Nov 16, 2010 @ 01:58 PM
Sadly my burrito doesn't install, I'll have to wait
Stray closed this discussion on Feb 18, 2011 @ 07:12 PM.