<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.23486-</id>
  <updated>2009-11-16T15:45:46Z</updated>
  <title>Comments for Flex Builder Enhancements (http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.23486</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=23486" title="Flex Builder Enhancements" />
    <published>2008-04-28T14:00:00Z</published>
    <updated>2008-04-28T17:54:12Z</updated>
    <title>Flex Builder Enhancements</title>
    <summary>
Learn how to enhance your stand-alone installation of Flex Builder with some of your favorite features from Eclipse&apos;s Java Developers Toolkit and Web Standard Tools by dropping a few jars into your plugins directory.  In this entry we&apos;ll discuss the TODO/FIXME tool, Snippets, Mylyn integration with Trac, and a fix to menu crashes in Leopard.</summary>
    <author>
      <name>RJ Owen</name>
      
    </author>
    
    <category term="Blogs" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<p>If you came to Flex from the Java world, like me you were probably excited to hear that Flex Builder was built on Eclipse.  Your heart swelled at the prospect of building sweet, beautiful, interactive applications using the same great platform that was the shining light of your dark development years in the salt mines of the Java empire.</p>

<p>Like me, you were probably also very disheartened to learn that many, if not most, of these features were not available in Flex Builder.  It turns out fate had dealt you a nasty card, and most of those blessed features were part of the Java Development Tookit and not part of Eclipse itself.  Try as they might, Adobe has been slow to implement them, though major strides have been made in Flex 3.  It turns out things like Snippets and TODO, refactoring and auto-generating getter and setter methods were harder than you thought.</p>

<p>Well, my friend, I have some good news for you.  Since Flex Builder is still Eclipse under the covers, some enterprising individuals have found good, easy, simple ways of dropping in a few jars and returning some of those features you loved.</p>

<p><u><strong>TODO / FIXME:</strong></u></p>

<p>The "TODO" and "FIXME" features in the JDT were nice ways to leave and find reminders in your code.  You can read more on adding this feature to Flex Builder <a href="http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757">here</a>.  Though this post is for Flex 2, it works for Flex 3 also.  Thanks to Drew McLean for tipping me off to this.</p>

<p><u><strong>Snippets:</strong></u></p>

<p>Snippets are a handy way to insert templatized code and are part of the Eclipse "Web Standard Tools."  The interface is a little awkward, but you get used to it.  After adding <a href="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/org.eclipse.wst.common.snippets_1.1.101.v200705302225.jar">this jar</a> to your FlexBuilder>Plugins directory, restart Flex Builder.  Add the snippets view.  Here's the most awkward part: to create a new snippet, you'll need to highlight some text, copy it, and then click the little "down" arrow in the upper right corner of the snippets view.  Select "Paste as Snippet".  Whether you want to use that text in your snippet or not is irrelevant.</p>

<div class="ap_c" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2010.png"><img src="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2010.png" alt="Paste a snippet" title="Click to enlarge" width="200"/></a></div>

<p>Now you're ready to make a snippet.  Snippets use ANT syntax to specify variables in the code.  Here's your Snippets interface:</p>

<div class="ap_c" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2012.png" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2012.png" alt="blank snippet" title="Click to enlarge" width="400"/></a><div class="apcaption">A blank snippet view</div></div>

<p>I made a getter/setter snippet like this:</p>

<p>private var _${PROP_NAME};<br />
[Bindable]<br />
public function set ${PROP_NAME}(temp:${PROP_TYPE}):void{<br />
	_${PROP_NAME} = temp;<br />
}<br />
public function get ${PROP_NAME}():${PROP_TYPE}{<br />
	return _${PROP_NAME};<br />
}</p>

<div class="ap_c" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2013.png" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%2013.png" alt="finished snippet" title="Click to enlarge" width="400"/></a><div class="apcaption">Finished Snippet</div></div>

<p>To add the snippet, double click the snippet of your choice in the snippets view.  You'll be prompted with this interface:</p>

<div class="ap_c"style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%208.png"><img src="http://www.insideria.com/upload/2008/04/flex_builder_enhancements_snip/Picture%208.png" alt="Add a snippet" title="Click to enlarge" width="400"/></a><div class="apcaption">Add a snippet view</div></div>

<p>Fill in your variable names in the table and click "Insert."  Congratulations - you've just made a snippet, and while you probably didn't save any time at all this first time, you probably will later.  Probably.</p>

<p>Thanks to <a href="http://www.andymcintosh.com">Andy McIntosh</a> for tipping me off to this.</p>

<p>For more on adding the entire WST, check out <a href="http://www.iheartair.com/?p=59">this post from Jun at RealEyes Media.</a></p>

<p><u><strong>Mylyn plugin for Trac integration</strong></u></p>

<p>If you use Flex Builder and <a href="http://trac.edgewall.org/">Trac</a>, you might want to look into the Mylyn plugin.  Mylyn lets you easily see and update all of your Trac tickets from within Flex Builder through a much better interface than the web-based version Trac uses by default.  </p>

<p>Adam Flater has an <a href="http://adamflater.blogspot.com/2007/12/review-of-mylyn.html">extensive post up</a> (with broken images at the moment) on using and installing Mylyn, so I won't reproduce his work here.  </p>

<p>Mylyn uses too many of the JDT jars to be easily dropped into the standalone version of Flex Builder, as far as I know.  If someone figures out which it requires post it in the comments and I'll add an update.</p>

<p><u><strong>Fix the "Open Resource" Menu</strong></u></p>

<p>Andy McIntosh has a great post up about fixing the Open Resource menu in Flex Builder, as it crashes Flex Builder 3 on Macs running Leopard.  I'm including the fix because like the features above it's a single jar you drop into your Flex Builder installation.  If you've been having this problem, <a href="http://www.andymcintosh.com/?p=31">get the fix here.</a>  Adobe's documented the bug <a href="http://bugs.adobe.com/jira/browse/FB-10935">here</a> and this fix should be included in a patch soon.</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016827</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016827" />
    <title>Comment from Mrinal Wadhwa on 2008-04-28</title>
    <author>
        <name>Mrinal Wadhwa</name>
        <uri>http://weblog.mrinalwadhwa.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://weblog.mrinalwadhwa.com">
        <![CDATA[<p>Thanks for the pointers RJ </p>

<p>I also use  Subclipse for subversion with FlexBuilder <a href="http://subclipse.tigris.org/">http://subclipse.tigris.org/</a></p>]]>
    </content>
    <published>2008-04-28T19:47:48Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016829</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016829" />
    <title>Comment from christian on 2008-04-28</title>
    <author>
        <name>christian</name>
        <uri>http://nuthinking.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://nuthinking.com">
        <![CDATA[<p>Did someone know why they didn't implement templates as FDT and Java? Those are great!</p>]]>
    </content>
    <published>2008-04-28T20:02:51Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016833</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016833" />
    <title>Comment from A. on 2008-04-28</title>
    <author>
        <name>A.</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>what about auto formatting???</p>]]>
    </content>
    <published>2008-04-28T23:22:14Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016840</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016840" />
    <title>Comment from Adrian on 2008-04-29</title>
    <author>
        <name>Adrian</name>
        <uri>http://www.iceknife.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.iceknife.com">
        <![CDATA[<p>I would give my firstborn for auto formatting, especially where we can say ahead of time "put the opening curly brace at the end of the line!".  Oh my.</p>

<p>I find FB3's biggest let down is the long list of Eclipse features not supported. Here's hoping FB4 addresses this. Refactoring (pull up, push down, extract interface, etc), getter and setter auto generation, code formatting, the list goes on.</p>

<p>But lest we forget - a HUGE thank you for posting how to get snippets up and running again! :-)  thanks!</p>]]>
    </content>
    <published>2008-04-29T12:38:35Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016907</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016907" />
    <title>Comment from Paul Whitelock on 2008-05-02</title>
    <author>
        <name>Paul Whitelock</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Thanks for the tip about Snippets. I discovered that if you right-click in the Snippets window and choose "Customize..." a palette is displayed that lets you create Snippet categories and items from scratch without the need to use the "select and copy" trick.</p>]]>
    </content>
    <published>2008-05-02T17:49:14Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016933</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016933" />
    <title>Comment from Zach Stepek on 2008-05-05</title>
    <author>
        <name>Zach Stepek</name>
        <uri>http://www.cravemg.com/blog/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.cravemg.com/blog/">
        <![CDATA[<p>I find that the Select Required button in the Find/Install Updates dialog in Eclipse is my best friend when I'm trying to get dependencies figured out. Makes it a ton easier to install things.</p>]]>
    </content>
    <published>2008-05-05T12:31:28Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2016991</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2016991" />
    <title>Comment from ZaBlanc on 2008-05-07</title>
    <author>
        <name>ZaBlanc</name>
        <uri>http://raptureinvenice.blogspot.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://raptureinvenice.blogspot.com">
        <![CDATA[<p>Thanks for the writeup. The snippet is a good example, but needs a slight fix and might as well make it adopt Adobe coding standards. :-)  Here's another version:</p>

<p><br />
private var _${PROP_NAME}:${PROP_TYPE};</p>

<p>[Bindable]<br />
public function set ${PROP_NAME}(value:${PROP_TYPE}):void {<br />
    _${PROP_NAME} = value;<br />
}</p>

<p>public function get ${PROP_NAME}():${PROP_TYPE} {<br />
    return _${PROP_NAME};<br />
}<br />
</p>]]>
    </content>
    <published>2008-05-07T21:14:41Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2017283</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2017283" />
    <title>Comment from Leif Wells on 2008-05-20</title>
    <author>
        <name>Leif Wells</name>
        <uri>http://www.augatlanta.org</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.augatlanta.org">
        <![CDATA[<p>Re: Source Formatting:<br />
<a href="http://bugs.adobe.com/jira/browse/FB-8297">http://bugs.adobe.com/jira/browse/FB-8297</a></p>

<p>Go vote on the enhancement if you want it to happen!</p>

<p>Leif<br />
Atlanta</p>]]>
    </content>
    <published>2008-05-21T04:25:25Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2017335</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2017335" />
    <title>Comment from Leif Wells on 2008-05-23</title>
    <author>
        <name>Leif Wells</name>
        <uri>http://www.leifwells.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.leifwells.com">
        <![CDATA[<p>I am not recommending the snippets plugin that you recommend in this enty. Compared to other implementation of this feature for Java or JavaScript.</p>

<p>This snippets plugin, in my opinion, is unusable. In fact, I'd say it's harmful.</p>

<p>Please vote for true code template functionality for Flex Builder: <a href="http://bugs.adobe.com/jira/browse/FB-11842">http://bugs.adobe.com/jira/browse/FB-11842</a></p>

<p>Leif<br />
Atlanta</p>]]>
    </content>
    <published>2008-05-23T14:32:57Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2046817</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2046817" />
    <title>Comment from enhancer on 2008-11-23</title>
    <author>
        <name>enhancer</name>
        <uri>http://www.hughs-reviews.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.hughs-reviews.com">
        <![CDATA[<p>Very nice plugin.  I've been using this method for quite some time but thanks for covering it again in further details.</p>]]>
    </content>
    <published>2008-11-23T21:51:18Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2066680</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2066680" />
    <title>Comment from George Profenza on 2009-06-22</title>
    <author>
        <name>George Profenza</name>
        <uri>http://lifesine.eu</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://lifesine.eu">
        <![CDATA[<p>Handy stuff! Thanks! I was just looking for a getter/setter in FB3. Thanks again!</p>]]>
    </content>
    <published>2009-06-22T10:26:21Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2067993</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2067993" />
    <title>Comment from fredi on 2009-07-09</title>
    <author>
        <name>fredi</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>For usability sake, if anything.</p>

<p>Programmers find every way possible to avoid typing. When writing a trace statement, a programmer is probably already upset that something isn't going on as expected, and having to type out whatever details they need into trace(s).</p>

<p>You're implying that you want us to type more? <a href="http://www.envisionwebhosting.com/domain-registration.htm">domain name registration</a> Visually clutter up the code even more? Add another tab column so we have to scroll right for long statements even more often? Add more time to our compile times?</p>

<p>CONFIG::debugtrace {<br />
      trace("ClassName functionName expected value: " + val1 + " actual used value: " composedVarName.attribute.value);<br />
}</p>

<p>Just so that the next person in line who picks up the project who may not be as advanced as a programmer as us will handily compile a SWF that has hundreds of different trace statements in it because they don't know how to flag/unflag an mxmlc conditional? (nor even know such a thing exists) <a href="http://www.envisionwebhosting.com/web-design.php">web design</a></p>

<p>Flex has tons of useability features for novices / intermediate skill developers, yet the hard core AS3/Flex <a href="http://www.envisionwebhosting.com/seo.htm">search engine optimization</a> users  are expected to work... harder? This seems like an overall conflict of ideals.</p>

<p>The last feature enhancement item I suggested, generating getters/setters, also got prioritized to "never", even though almost every other OOP-based Flex perspective has a similar feature because it *saves time*.</p>

<p>Please Adobe, don't forget the hardcore guys. We're coding all day, and want to save minutes here and there because at the end of the week that stacks up to saving hours.</p>]]>
    </content>
    <published>2009-07-09T11:38:28Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2069906</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2069906" />
    <title>Comment from Marcos on 2009-08-06</title>
    <author>
        <name>Marcos</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Those tips are great!<br />
Is there another way doing snippets Flex Buider?</p>

<p>Thanks.<br />
Great post!</p>

<p>Marcos <br />
<a href="http://www.otimizacao-de-websites.com">otimização de sites</a></p>]]>
    </content>
    <published>2009-08-06T18:07:22Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23486-comment:2070382</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23486" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html#comment-2070382" />
    <title>Comment from princess on 2009-08-14</title>
    <author>
        <name>princess</name>
        <uri>http://www.brandmantra.net/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.brandmantra.net/">
        <![CDATA[<p>thanks for covering this issue.......... i myself wanted to talk about it. though i am a <a href="http://www.brandmantra.net/website_design/web-designer.php">Web Designer</a> i find java quite interesting so its good to read this piece.</p>]]>
    </content>
    <published>2009-08-14T13:01:44Z</published>
  </entry>

</feed
