blob: c3dcb0a48474b2368e841e85daf850a8dd427e10 [file] [log] [blame]
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
<title>Search Infrastructure Extension Points</title>
</head>
<body link="#0000FF" vlink="#800080">
<center>
<h1>
Result Sorters</h1></center>
<b><i>Identifier: </i></b>org.eclipse.search.searchResultSorters
<p><b><i>Description</i>: </b>This extension point allows a plug-in to
contribute search result sorters to the search result view's <i>Sort</i>
context menu.
<p><b><i>Configuration Markup:</i></b>
<p><tt>&nbsp;&nbsp; &lt;!ELEMENT page EMPTY&gt;</tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST page</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pageId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tooltip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>
<ul>
<li>
<b>id</b> - a unique name that will be used to identify this search
result sorter.</li>
<li>
<b>pageId</b> - the ID of a registered search page for which the sorter
will be activated. "*" activates the sorter for all pages.</li>
<li>
<b>label</b> - a translatable label that will be used as the menu item's
label.</li>
<li>
<b>tooltip</b> - a translatable text that will be used as the menu
item's tool tip . If omitted, the menu item will have no tool tip.</li>
<li>
<b>icon</b> - a relative name of the image that will be shown in the
context menu along with the label. If omitted, the menu entry will only
contain a label.</li>
<li>
<b>class</b> - a name of the class that extends&nbsp;<tt>org.eclipse.jface.viewers.ViewerSorter</tt>.</li>
</ul>
<b><i>Examples:</i></b>
<p><tt>The following is an example of a search page extension definition:</tt>
<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.search.searchResultSorters"&gt;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;sorter</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.search.internal.ui.FileNameSorter"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pageId="*"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label="%FileNameSorter.label"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tooltip="%FileNameSorter.tooltip"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon="icons/full/ecl16/search_sort.gif"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.search.internal.ui.FileNameSorter"&gt;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;/sorter&gt;</tt>
<br><tt>&nbsp;&nbsp; &lt;/extension&gt;</tt>
<p><b><i>Supplied Implementation: </i></b>The search infrastructure
provides a sorter that sorts the matches by the resource name.
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
</body>
</html>