blob: e118861116bd0eca113d1aab1fc765888ab570f7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE>Contributing resource filters</TITLE>
<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H3>
Contributing resource filters</H3>
<P >
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.</P>
<P >
The workbench filters out the pattern &quot;<b>.*</b>&quot; to exclude internal files such as .metadata from the resource navigator. Likewise, the JDT plug-in filters out &quot;<b>*.class</b>&quot; files to hide compiled classes.</P>
<P >
The markup for the resource filters extension is simple.&nbsp; The following is
from the workbench <b>plugin.xml</b>.</P>
<pre>
&lt;extension
point=&quot;org.eclipse.ui.ide.resourceFilters&quot;&gt;
&lt;filter
selected=&quot;false&quot;
pattern=&quot;.*&quot;&gt;
&lt;/filter&gt;
&lt;/extension&gt;
</pre>
<P >The filters can be enabled by the user using the resource navigator's local
pull-down menu.</P>
<P ><img src="images/filtersmenu.png" alt="Resource filters menu" border="0" ></P>
<P >In addition to declaring the <b>filter pattern</b>,
the plug-in can use the <b>selected</b> attribute to
specify whether the filter should be enabled in the resource navigator.&nbsp;
This attribute only determines the initial state of the filter pattern.&nbsp; The user can
control which filter patterns are active.</P>
<P ><img src="images/filtersselection.png" alt="Filter selection dialog" border="0" ></P>
</BODY>
</HTML>