Johnvh.com - home of Dallas, Texas based Flash Developer and web enthusiast John Van Horn

Online home of John Van Horn

Ignoring files in Flex Builder Navigator

I don't like seeing .svn or CVS files in my Flex Builder/Eclipse workspace. I'll never need to edit those files directly, and if I do, I won't use Flex Builder to do it. But if they're in your project, they'll show up in the Navigator panel. Everywhere.

Every directory in your project will have a .svn folder.

Every directory in your project will have a .svn folder.

Fortunately, Eclipse provides a way to filter files in the Navigator, but a) it's rather hidden, and b) it's not obvious how to add filters. In the Navigator panel, hit the down arrow in the top right corner and select "Filters...".

Navigator panel options.

Navigator panel options.

Here's the list of filters you get by default:

Default Filters

Default Filters

What? No "add filter" option? No "edit"? I guess you could use the ".*" filter, but that would hide every file or directory whose name starts with ".". That may or may not be acceptable, depending on the type of project or files your working with. What if you had a .htaccess file in your project?

Fortunately again, there is a mechanism for adding additional filters, but it's not obvious. It involves editing the plugins.xml file for the Flex Builder editor plugin. You can find this plugin in the eclipse plugins folder (located in same place as Flex Builder.app) in your Flex Builder install. It's called com.adobe.flexbuilder.standalone_3.0.194161, and it's located for me at:

CODE:
  1. /Applications/Adobe Flex Builder 3/plugins/com.adobe.flexbuilder.standalone_3.0.194161

So navigate there, and edit plugins.xml. You're looking for the extension node whose attribute point is "org.eclipse.ui.ide.resourceFilters". Under that node is where the default filters are defined. All you have to do is add another one and save the file:

Flex Builder editor plugin.xml, with svn filter added.

Flex Builder editor plugin.xml, with svn filter added.

The remaining step is to restart Flex Builder, using the -clean option. Since the plugin.xml file is either cached or compiled in somewhere, using the -clean option tells the Eclipse executable to reload all plugins and configs. This requires use of the Terminal:

CODE:
  1. $ cd /Applications/Adobe\ Flex\ Builder\ 3/Flex\ Builder.app/Contents/MacOS
  2. $ ./FlexBuilder -clean

When Flex Builder launches, you should now see the filter you just added in the filters window. Thanks to Robert Ames for telling me how to launch Flex Builder with arguments.

New filter added.

New filter added.

Comments
Leave a reply
  • Devin

    May 12, 2009 11:08am

    Thank you very much for this tutorial, I have seen some fixes for this issue but that they only worked with .svn, and I needed it for _svn. This worked great, thank again.

  • T Ramkumaran

    Aug 19, 2009 7:01am

    My operation system is Windows XP

    I am using _svn instead of .svn.

    I used $ ./FlexBuilder -clean

    But, I doesn't take any effect on flex builder. Still it is showing _svn in Flex Builder.

    $ ./FlexBuilder -refresh -clean.

    Now, I can see the _svn in my filter list

  • Julien Bier

    Nov 26, 2009 10:49am

    Thanks a lot for this tuto !

    ;)

  • Andrew Cronk

    Jan 25, 2010 5:21pm

    Thank you! You've made my life a little better.

  • Matthew

    Mar 3, 2010 11:14am

    This is the kind of stuff that drives me nuts about Eclipse-based applications. Thanks for providing a solution.

Trackbacks, pings
  • Flex Builder Plugin …Navigation Filters » activepoison.com

    May 28, 2009 10:05pm

    [...] I found a post here on how to add .svn to your filters list in Flex Builder.  But I wasn’t too sure how to add a [...]

  • Leave a reply

    You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Twitter
    Del.icio.us links
    » My delicious bookmarks