<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Software on a smoking barrel &#187; Flex formatting</title>
	<atom:link href="http://www.margelatu.org/tag/flex-formatting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.margelatu.org</link>
	<description></description>
	<lastBuildDate>Thu, 06 Oct 2011 14:01:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A Flex formatter</title>
		<link>http://www.margelatu.org/2009/02/04/a-flex-formatter/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-flex-formatter</link>
		<comments>http://www.margelatu.org/2009/02/04/a-flex-formatter/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 00:51:01 +0000</pubDate>
		<dc:creator>Ionut-Maxim Margelatu</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex formatting]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://margelatu.org/?p=14</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.margelatu.org/2009/02/04/a-flex-formatter/' addthis:title='A Flex formatter '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>I use the Flex Builder plug-in on top of Eclipse for Flex development . When it comes to coding in Flex, I often find myself missing all of those subtle but priceless options that Eclipse&#8217;s Java editor has, like the code formatting, code templates, commenting style or the all-mighty &#8220;Save Actions&#8221; option which automatically performs [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.margelatu.org/2009/02/04/a-flex-formatter/' addthis:title='A Flex formatter ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.margelatu.org/2009/02/04/a-flex-formatter/' addthis:title='A Flex formatter '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>I use the Flex Builder plug-in on top of Eclipse for Flex development . When it comes to coding in Flex, I often find myself missing all of those subtle but priceless options that Eclipse&#8217;s Java editor has, like the code formatting, code templates, commenting style or the all-mighty &#8220;Save Actions&#8221; option which automatically performs specific actions whenever you save your code.</p>
<p>I&#8217;ve recently started working on a project with an existing codebase, out of which 90% is Flex code. Facing the possibility of applying our team&#8217;s coding guidelines to countless lines of Flex code that I would have to modify, I turned to my browser and began a frantic search for something that would help. I came across a small project aiming to provide exactly what I needed : Flex formatting options. The project is called <strong>Flex Formatter</strong> and it can be found at  <a title="http://sourceforge.net/projects/flexformatter" href="http://sourceforge.net/projects/flexformatter" target="_blank">http://sourceforge.net/projects/flexformatter/</a> on good ol&#8217; Sourceforge. It provides a set of formatting options for ActionScript and MXML code which may cover some of the common needs of any Flex developer out there.</p>
<p>To install it, I downloaded the latest version (0.6.7 at the time of this writing) from Sourceforge, in the form of a jar file. I copied the jar in Eclipse&#8217;s <em>plugins</em> folder and restarted Eclipse.</p>
<p>After restarting Eclipse, a new item called <em>Flex Formatting</em> appeared in Eclipse&#8217;s <em>Preferences</em> window, with options for ActionScript and MXML indenting and code formatting. I found particularly useful the indentation and the text wrapping options. Once I decided on the rules I wanted, I clicked &#8216;Apply&#8217; to save my changes. Back in Eclipse&#8217;s main toolbar, 2 new buttons have appeared : <em>Format Flex code (selected lines)</em> and <em>Indent Flex code (selected lines)</em>. The first will apply the rules you have specified on any Flex code selection (including indentation), while the second button will only properly indent the Flex code selection.</p>
<p>Another interesting option of this small tool is the possibility to export the rules to a file and import them later. This can be done from the same <em>Flex Formatting</em> item in Eclipse&#8217;s <em>Preferences</em> window. Exporting &amp; importing make it easier for team members to share their coding style options. One team member could create the rules, export them to a file and put the file on a versioning server. The rest of the team could then retrieve the file from the versioning server and import it in Eclipse.</p>
<p>The formatter is far from complete. In its current version (0.6.7), it lacks some options like performing the formatting on save and it could also do with a more fine-grained set of formatting options. However, after just a couple of days of using it, this tool has saved me a lot of time and energy and I think it is definitely worth using it and I would recommend it to any Flex developer. Just try it, it won&#8217;t bite. It just flexes.<!-- PHP 5.x --></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.margelatu.org/2009/02/04/a-flex-formatter/' addthis:title='A Flex formatter ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.margelatu.org/2009/02/04/a-flex-formatter/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Object Caching 338/350 objects using disk: basic

Served from: www.margelatu.org @ 2011-10-14 07:05:34 -->
