tag:robotlegs.tenderapp.com,2009-10-18:/discussions/solutions/8-flashbuilder-burrito-code-templates-injectRobotlegs: Discussion 2018-10-18T16:35:19Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-05T14:59:43Z2010-11-05T14:59:43ZFlashBuilder Burrito Code Templates [Inject]<div><p>Hi Ondina,</p>
<p>I've only just installed Burrito, so need some time to check it out properly. The article you linked to makes no mention of <em>how</em> to build that metadata.xml file. Any idea?</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-05T16:23:17Z2010-11-05T16:23:17ZFlashBuilder Burrito Code Templates [Inject]<div><p>Hi Shaun,</p>
<p>if you look under</p>
<p>\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks</p>
<p>you’ll see a metadata.xml file, that contains the supported metadata tags.<br />
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</p>
<p>Maybe something like this?<br />
</p>
<pre><code>see attachment</code></pre>
<p>(I don’t know how to edit xml in here, the code or pre tags don't work with xml? )</p>
<p>This way you’d probably get just the [Inject] tag without the<br />
public var ${someValue}:${someType};</p>
<p>I could ask (over the weekend or next week) on the Flex Forum how to do that...</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-08T22:44:55Z2010-11-08T22:44:55ZFlashBuilder Burrito Code Templates [Inject]<div><p>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:</p>
<p><a href="https://github.com/probertson/robotlegs-framework/commit/08c8d55b5d279ff9fd18fcf9ddcda4be543d9160">https://github.com/probertson/robotlegs-framework/commit/08c8d55b5d...</a></p>
<p>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.</p>
<p>The documentation for adding the code hints is here (although it only tells how to package them, not the syntax for the xml file):</p>
<p><a href="http://goo.gl/9h5Zx">http://goo.gl/9h5Zx</a></p></div>Paul Robertsontag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-08T23:46:10Z2010-11-08T23:46:10ZFlashBuilder Burrito Code Templates [Inject]<div><p>Awesome! Thanks Ondina and Paul. I've merged those changes in, and they'll go out in the next release.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T10:43:27Z2010-11-09T10:43:27ZFlashBuilder Burrito Code Templates [Inject]<div><p>im installing it now, any luck migrating fb4 projects?</p></div>Nikos tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T11:05:50Z2010-11-09T11:05:50ZFlashBuilder Burrito Code Templates [Inject]<div><p>That’s great! Thanks, Paul and Shaun.</p>
<p>For those interested in FlashBuilder Burrito templates see Paul’s<br />
<a href="http://probertson.com/articles/2010/10/25/flashbuilder-burrito-templates-for-robotlegs-and-more/">http://probertson.com/articles/2010/10/25/flashbuilder-burrito-temp...</a></p>
<p>Paul, could you put the templates on github, so everyone can contribute with new patterns?</p>
<p>Cheers,<br />
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T11:06:14Z2010-11-09T11:06:14ZFlashBuilder Burrito Code Templates [Inject]<div><p>Hi Nikos,</p>
<p>I’ve migrated one of my projects from FB4 to Burrito successfully. No issues yet.<br />
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T11:21:28Z2010-11-09T11:21:28ZFlashBuilder Burrito Code Templates [Inject]<div><p>Cool, I take it you can't share workspaces?</p></div>Nikos tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T11:32:03Z2010-11-09T11:32:03ZFlashBuilder Burrito Code Templates [Inject]<div><p>Obviously not possible:<br />
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". (<a href="http://labs.adobe.com/wiki/index.php/Flash_Builder_Burrito">http://labs.adobe.com/wiki/index.php/Flash_Builder_Burrito</a>)</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T11:35:08Z2010-11-09T11:35:08ZFlashBuilder Burrito Code Templates [Inject]<div><p>yeah thought so thanks Ondina Robot :)</p></div>Nikos tag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T16:40:33Z2010-11-09T16:40:33ZFlashBuilder Burrito Code Templates [Inject]<div><p>At Ondina's suggestion, I've posted my templates on GitHub:</p>
<p><a href="https://github.com/probertson/FlashBuilder-templates">https://github.com/probertson/FlashBuilder-templates</a></p>
<p>It's just the XML files for now. I'll try to add Readme files soon with more explanations.</p></div>Paul Robertsontag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T17:59:32Z2010-11-09T17:59:32ZFlashBuilder Burrito Code Templates [Inject]<div><p>Hi guys,<br />
great usefull post for the RL comunity! How about a little step-by-step tutorial for us "mortals" Paul?<br />
Thanks a lot, long live to RL!</p></div>jaddtag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-09T18:41:53Z2010-11-09T18:41:53ZFlashBuilder Burrito Code Templates [Inject]<div><p>To import the templates into Flash Builder Burrito:</p>
<ol>
<li>open up preferences<br />
</li>
<li>choose Flash Builder > Editors > Code Templates > ActionScript.<br />
</li>
<li>Click the “import” button below the list of templates<br />
</li>
<li>choose the XML file to import</li>
</ol>
<p>Once you have the template imported, to use a template:</p>
<ol>
<li>Start typing the name of the template (e.g. "inj" for the "inject" template)<br />
</li>
<li>Hit Ctrl+space to trigger code hints. By default template hints are mixed in with other hints, so you may need to type a few more characters to get your template. Or you can hit Ctrl+space again to just get template proposals and nothing else<br />
</li>
<li>With the desired template selected, hit [enter]<br />
</li>
<li>The cursor will now be in the first template field (e.g. the variable name for the Inject template). Type the value you want.<br />
</li>
<li>Hit [tab] to jump to the next field and enter its value. If you're entering a class name, you can hit Ctrl+space for code hints and when you select the class name with [enter] it should add the import statement etc.<br />
</li>
<li>When you're done with the last template field, hit [tab] once more to jump to the end of the template so you can continue coding.</li>
</ol></div>Paul Robertsontag:robotlegs.tenderapp.com,2009-10-18:Comment/36482792010-11-16T13:58:20Z2010-11-16T13:58:38ZFlashBuilder Burrito Code Templates [Inject]<div><p>Sadly my burrito doesn't install, I'll have to wait</p></div>Nikos