Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Contributing resource filters

The resource filters extension allows plug-ins to define filters that are useful for filtering out file types in the resource navigator view. This extension is useful when special file types are used to represent internal plug-in information but you do not want the files to be shown in the workbench or manipulated by the user.

The workbench filters out the pattern ".*" to exclude internal files such as .metadata from the resource navigator. Likewise, the JDT plug-in filters out "*.class" files to hide compiled classes.

The markup for the resource filters extension is simple.  The following is from the workbench plugin.xml.

<extension
         point="org.eclipse.ui.ide.resourceFilters">
      <filter
            selected="false"
            pattern=".*">
      </filter>
   </extension>

The filters can be enabled by the user using the resource navigator's local pull-down menu.

Resource filters menu

In addition to declaring the filter pattern, the plug-in can use the selected attribute to specify whether the filter should be enabled in the resource navigator.  This attribute only determines the initial state of the filter pattern.  The user can control which filter patterns are active.

Filter selection dialog


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire