Ignoring .svn folder in Flex Builder Navigator

来源:互联网 发布:备忘录方法 c语言 编辑:程序博客网 时间:2024/05/17 06:59

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:

PLAIN TEXT
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:

PLAIN TEXT
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.

Next post: Master bathroom progress

原创粉丝点击