Note: Custom File Filters for Flex Builder Stand-alone’s Flex Navigator
While using Eclipse or Flex Builder, there are times when you want to ignore certain folders in the Eclipse Project Explorer or the Flex Navigator. If you click on the properties for this window then you can apply certain filters. But there are times when you want to add more filters to this list. Here are the steps to do this. (Creating custom filters for eclipse project explorer or custom filters for the Flex Navigator)
Customizing the list of filters isn’t a easy as you would hope (e.g. just clicking add), but it isn’t as difficult as you think if you’re comfortable with editing text files ;). There may be other ways, but this is what I did to tell Flex Builder to ignore my build directories that I had named target:
1. Locate the directory of the Eclipse plugin being used for editing. This is usually something like eclipse/plugins/[plugin name]_[version].
Some examples are:
Flex Builder 3 default installation:
Adobe\Flex Builder 3\plugins\com.adobe.flexbuilder.standalone_3.0.194161
my Aptana plugin directory:
eclipse/plugins/com.aptana.ide.scripting_0.2.9.16696
2. Once you find the plugin directory, open the plugin.xml file in a text editor.
3. Find the extension element whose point attribute has a value of org.eclipse.ui.ide.resourceFilters.
<extension
point=”org.eclipse.ui.ide.resourceFilters”>
4. Copy one of the existing filter elements that already exist and create one that contains the needed file pattern. For my example:
<filter
pattern=”target”
selected=”true”/>
</extension>
5. Restart Eclipse using the -clean switch.
If your file didn’t include a resourceFilters section, you can insert one similar to the one that follows:
<extension point=”org.eclipse.ui.ide.resourceFilters”>
<filter selected=”false” pattern=”.svn”><filter>
<filter selected=”false” pattern=”.project”><filter>
After restarting Eclipse with the -clean switch, the custom file patterns appeared in the Filters list and I was able to hide any patterns.