blob: c648ffd0ae5ac574edd805694bb6b403d452f319 [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>Eclipse Search Infrastructure Extension Point: Result Sorters</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 sorter EMPTY&gt;</tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST sorter</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>
<br><tt>&nbsp;&nbsp; &gt;</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. &quot;*&quot; 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=&quot;org.eclipse.search.searchResultSorters&quot;&gt;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;sorter</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id=&quot;org.eclipse.search.internal.ui.FileNameSorter&quot;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pageId=&quot;*&quot;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label=&quot;%FileNameSorter.label&quot;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tooltip=&quot;%FileNameSorter.tooltip&quot;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon=&quot;icons/full/ecl16/search_sort.gif&quot;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=&quot;org.eclipse.search.internal.ui.FileNameSorter&quot;&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>
<p><br>
<p>&nbsp;<a href="hglegal2002.htm"><img src="ngibmcpy2002.gif" alt="Copyright IBM Corporation 2000, 2002. All Rights Reserved." border="0" width="324" height="14"></a>
</p>
</body>
</html>