This commit was manufactured by cvs2svn to create tag 'v133'.

Sprout from master 2001-08-28 15:50:40 UTC nick 'kum: build submission 133'
Cherrypick from master 2001-08-28 16:36:24 UTC nick '*** empty log message ***':
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaActionContributor.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaAnnotationHover.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaContentOutlinePage.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaDocumentProvider.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorEnvironment.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.properties
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaSourceViewerConfiguration.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/PresentationAction.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCodeScanner.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCompletionProcessor.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaEditorMessages.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaPartitionScanner.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocCompletionProcessor.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocScanner.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/togglepresentation.gif
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaColorProvider.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWhitespaceDetector.java
    org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWordDetector.java
Delete:
    org.eclipse.search/.classpath
    org.eclipse.search/.cvsignore
    org.eclipse.search/.vcm_meta
    org.eclipse.search/build.properties
    org.eclipse.search/doc/hglegal.htm
    org.eclipse.search/doc/ngibmcpy.gif
    org.eclipse.search/doc/org_eclipse_search.html
    org.eclipse.search/doc/org_eclipse_search_searchPages.html
    org.eclipse.search/doc/org_eclipse_search_searchResultSorters.html
    org.eclipse.search/exportplugin.xml
    org.eclipse.search/icons/basic/clcl16/search_goto.gif
    org.eclipse.search/icons/basic/clcl16/search_history.gif
    org.eclipse.search/icons/basic/clcl16/search_next.gif
    org.eclipse.search/icons/basic/clcl16/search_prev.gif
    org.eclipse.search/icons/basic/clcl16/search_rem.gif
    org.eclipse.search/icons/basic/clcl16/search_remall.gif
    org.eclipse.search/icons/basic/clcl16/search_sortmatch.gif
    org.eclipse.search/icons/basic/clcl16/search_stop.gif
    org.eclipse.search/icons/basic/ctool16/search.gif
    org.eclipse.search/icons/basic/cview16/searchres.gif
    org.eclipse.search/icons/basic/dlcl16/search_goto.gif
    org.eclipse.search/icons/basic/dlcl16/search_history.gif
    org.eclipse.search/icons/basic/dlcl16/search_next.gif
    org.eclipse.search/icons/basic/dlcl16/search_prev.gif
    org.eclipse.search/icons/basic/dlcl16/search_rem.gif
    org.eclipse.search/icons/basic/dlcl16/search_remall.gif
    org.eclipse.search/icons/basic/dlcl16/search_sortmatch.gif
    org.eclipse.search/icons/basic/dlcl16/search_stop.gif
    org.eclipse.search/icons/basic/dtool16/search.gif
    org.eclipse.search/icons/basic/elcl16/search_goto.gif
    org.eclipse.search/icons/basic/elcl16/search_history.gif
    org.eclipse.search/icons/basic/elcl16/search_next.gif
    org.eclipse.search/icons/basic/elcl16/search_prev.gif
    org.eclipse.search/icons/basic/elcl16/search_rem.gif
    org.eclipse.search/icons/basic/elcl16/search_remall.gif
    org.eclipse.search/icons/basic/elcl16/search_sortmatch.gif
    org.eclipse.search/icons/basic/elcl16/search_stop.gif
    org.eclipse.search/icons/basic/etool16/search.gif
    org.eclipse.search/icons/basic/eview16/searchres.gif
    org.eclipse.search/icons/basic/obj16/searchm_obj.gif
    org.eclipse.search/icons/basic/obj16/tsearch_dpdn_obj.gif
    org.eclipse.search/icons/basic/obj16/tsearch_obj.gif
    org.eclipse.search/icons/full/clcl16/search_goto.gif
    org.eclipse.search/icons/full/clcl16/search_history.gif
    org.eclipse.search/icons/full/clcl16/search_next.gif
    org.eclipse.search/icons/full/clcl16/search_prev.gif
    org.eclipse.search/icons/full/clcl16/search_rem.gif
    org.eclipse.search/icons/full/clcl16/search_remall.gif
    org.eclipse.search/icons/full/clcl16/search_sortmatch.gif
    org.eclipse.search/icons/full/clcl16/search_stop.gif
    org.eclipse.search/icons/full/ctool16/search.gif
    org.eclipse.search/icons/full/cview16/searchres.gif
    org.eclipse.search/icons/full/dlcl16/search_goto.gif
    org.eclipse.search/icons/full/dlcl16/search_history.gif
    org.eclipse.search/icons/full/dlcl16/search_next.gif
    org.eclipse.search/icons/full/dlcl16/search_prev.gif
    org.eclipse.search/icons/full/dlcl16/search_rem.gif
    org.eclipse.search/icons/full/dlcl16/search_remall.gif
    org.eclipse.search/icons/full/dlcl16/search_sortmatch.gif
    org.eclipse.search/icons/full/dlcl16/search_stop.gif
    org.eclipse.search/icons/full/dtool16/search.gif
    org.eclipse.search/icons/full/elcl16/search_goto.gif
    org.eclipse.search/icons/full/elcl16/search_history.gif
    org.eclipse.search/icons/full/elcl16/search_next.gif
    org.eclipse.search/icons/full/elcl16/search_prev.gif
    org.eclipse.search/icons/full/elcl16/search_rem.gif
    org.eclipse.search/icons/full/elcl16/search_remall.gif
    org.eclipse.search/icons/full/elcl16/search_sortmatch.gif
    org.eclipse.search/icons/full/elcl16/search_stop.gif
    org.eclipse.search/icons/full/etool16/search.gif
    org.eclipse.search/icons/full/eview16/searchres.gif
    org.eclipse.search/icons/full/obj16/searchm_obj.gif
    org.eclipse.search/icons/full/obj16/tsearch_dpdn_obj.gif
    org.eclipse.search/icons/full/obj16/tsearch_obj.gif
    org.eclipse.search/plugin.jars
    org.eclipse.search/plugin.properties
    org.eclipse.search/plugin.xml
    org.eclipse.search/search.jar
    org.eclipse.search/search/org/eclipse/search/internal/core/ISearchScope.java
    org.eclipse.search/search/org/eclipse/search/internal/core/SearchScope.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/AmountOfWorkCalculator.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/ITextSearchResultCollector.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchEngine.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchScope.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
    org.eclipse.search/search/org/eclipse/search/internal/core/text/TypedResourceVisitor.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/GotoMarkerAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ISearchHelpContextIds.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/MatchSorter.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/OpenSearchDialogAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllResultsAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllSearchesAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveMatchAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveResultAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcePathSorter.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcenameSorter.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/Search.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchAgainAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDropDownAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPluginImages.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultContentProvider.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultLabelProvider.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewEntry.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ShowNextResultAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ShowPreviousResultAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchesAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/SorterDescriptor.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/text/GotoMarkerAction.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/text/GroupByKeyComputer.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchOperation.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchResultCollector.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExceptionHandler.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExtendedDialogWindow.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/FileTypeEditor.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/ListDialog.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/MessageLine.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/RowLayouter.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
    org.eclipse.search/search/org/eclipse/search/internal/ui/util/TypeFilteringDialog.java
    org.eclipse.search/search/org/eclipse/search/ui/IContextMenuContributor.java
    org.eclipse.search/search/org/eclipse/search/ui/IGroupByKeyComputer.java
    org.eclipse.search/search/org/eclipse/search/ui/ISearchPage.java
    org.eclipse.search/search/org/eclipse/search/ui/ISearchPageContainer.java
    org.eclipse.search/search/org/eclipse/search/ui/ISearchPageScoreComputer.java
    org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
    org.eclipse.search/search/org/eclipse/search/ui/ISearchResultViewEntry.java
    org.eclipse.search/search/org/eclipse/search/ui/SearchUI.java
    org.eclipse.search/search/org/eclipse/search/ui/package.html
diff --git a/org.eclipse.search/.classpath b/org.eclipse.search/.classpath
deleted file mode 100644
index 0f1d2e0..0000000
--- a/org.eclipse.search/.classpath
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-    <classpathentry kind="src" path="Eclipse Search"/>
-    <classpathentry kind="src" path="/org.eclipse.ui"/>
-    <classpathentry kind="lib" path="/org.eclipse.help/help.jar" sourcepath="/org.eclipse.help/helpsrc.zip"/>
-    <classpathentry kind="lib"
-        path="/org.eclipse.core.resources/resources.jar" sourcepath="/org.eclipse.core.resources/resourcessrc.zip"/>
-    <classpathentry kind="lib"
-        path="/org.eclipse.core.runtime/runtime.jar" sourcepath="/org.eclipse.core.runtime/runtimesrc.zip"/>
-    <classpathentry kind="lib" path="/org.eclipse.swt/swt.jar" sourcepath="/org.eclipse.swt/swtsrc.zip"/>
-    <classpathentry kind="lib" path="/org.apache.xerces/xerces.jar"/>
-    <classpathentry kind="var" path="JRE_LIB" rootpath="src" sourcepath="JRE_SRC"/>
-    <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.search/.cvsignore b/org.eclipse.search/.cvsignore
deleted file mode 100644
index 092357e..0000000
--- a/org.eclipse.search/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin

diff --git a/org.eclipse.search/.vcm_meta b/org.eclipse.search/.vcm_meta
deleted file mode 100644
index 757ab31..0000000
--- a/org.eclipse.search/.vcm_meta
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<project-description>

-	<comment></comment>

-	<nature id="org.eclipse.jdt.core.javanature"/>

-	<reference project-name="org.apache.xerces"/>

-	<reference project-name="org.eclipse.core.resources"/>

-	<reference project-name="org.eclipse.ui"/>

-	<builder name="org.eclipse.jdt.core.javabuilder">

-	</builder>

-</project-description>

diff --git a/org.eclipse.search/build.properties b/org.eclipse.search/build.properties
deleted file mode 100644
index dad17be..0000000
--- a/org.eclipse.search/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-bin.includes = plugin.xml,\

-               icons/,\

-               plugin.properties,\

-               *.jar

-build.includes = build.properties,\

-                 plugin.jars,\

-                 plugin.properties,\

-                 plugin.xml,\

-                 doc/,\

-                 icons/

-source.search.jar = Eclipse Search

-build.vaj.Eclipse\ Search = Eclipse Search

diff --git a/org.eclipse.search/doc/hglegal.htm b/org.eclipse.search/doc/hglegal.htm
deleted file mode 100644
index b071dbd..0000000
--- a/org.eclipse.search/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!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.73 [en] (Win98; U) [Netscape]">

-   <title>Legal Notices</title>

-</head>

-<body>

-

-<h3>

-<a NAME="Notices"></a>Notices</h3>

-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.

-</body>

-</html>

diff --git a/org.eclipse.search/doc/ngibmcpy.gif b/org.eclipse.search/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e9..0000000
--- a/org.eclipse.search/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/doc/org_eclipse_search.html b/org.eclipse.search/doc/org_eclipse_search.html
deleted file mode 100644
index 61eb6e4..0000000
--- a/org.eclipse.search/doc/org_eclipse_search.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

-<html>

-<head>

-   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

-   <title>Search Infrastructure Extension Points</title>

-</head>

-<body link="#0000FF" vlink="#800080">

-

-<center>

-<h1>

-IBM Eclipse Platform Search</h1></center>

-This document lists all of the extension points that the search plug-in makes 

-available to tool developers.

-<p>All XML sub-elements defined in the individual extension point documents

-may appear more than once inside an extension element. For example, a <tt>org.eclipse.search.searchPages</tt>

-extension may contain several instances of <tt>page</tt> elements. Although

-making one extension per sub-element is not technically incorrect, we recommend

-grouping for consistent style. It can also improve platform startup time

-because there will be fewer extensions to process.

-<br>

-<hr WIDTH="100%">

-<h1>

-Extension Points</h1>

-The following extension points can be used to extend the capabilities

-of the search infrastructure:

-<ul>

-<li>

-<a href="org_eclipse_search_searchPages.html">org.eclipse.search.searchPages</a></li>

-<li>

-<a href="org_eclipse_search_searchResultSorters.html">org.eclipse.search.searchResultSorters</a></li>

-</ul>

-<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>

diff --git a/org.eclipse.search/doc/org_eclipse_search_searchPages.html b/org.eclipse.search/doc/org_eclipse_search_searchPages.html
deleted file mode 100644
index e9c843b..0000000
--- a/org.eclipse.search/doc/org_eclipse_search_searchPages.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

-<html>

-<head>

-   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

-   <title>Search Infrastructure Extension Points</title>

-</head>

-<body link="#0000FF" vlink="#800080">

-

-<center>

-<h1>

-Search Pages</h1></center>

-<b><i>Identifier: </i></b>org.eclipse.search.searchPages

-<p><b><i>Description</i>: </b>This extension point allows a plug-in to register

-search pages for specialized searches. When the search action is performed on

-a resource, the search infrastructure locates the most specific registered search

-page for it.

-

-<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; label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</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; sizeHint&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tabPosition&nbsp;CDATA #IMPLIED</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions&nbsp;&nbsp;CDATA #IMPLIED</tt>

-<ul>

-<li>

-<b>id</b> - a unique name that will be used to identify this search page</li>

-

-<li>

-<b>label</b> - a translatable label that will be used in the search page tab</li>

-

-<li>

-<b>class</b> - a name of the class that implements <tt>org.eclipse.jface.dialogs.IDialogPage</tt>.

-We recommend subclassing <tt>org.eclipse.jface.dialogs.DialogPage</tt>.

-</li>

-

-<li>

-<b>icon</b> - a relative name of the image that will be used for all resources

-that match the specified extensions. If omitted, the

-search page's tab will only contain a label.</li>

-

-<li>

-<b>sizeHint</b> - a hint for the initial size of the page. This is a string

-containing the width and height separated by comma (e.g. "50, 60"). In the case

-this hint is omitted the page will be no larger than the other pages.</li>

-

-<li>

-<b>tabPosition</b> - an integer defining where the page is placed in the page book. The value does not define the absolute position but the position relative to the other pages. The ordering of pages is as follows:

-	<ol>

-	<li>if the tabPosition is not specified for a page then <tt>Integer.MAX_VALUE / 2</tt> is used</li>

-	<li>the page with the lower value comes first. If the values are equal then the pages are are ordered alphabetically according to their labels</li>

-	</ol>

-</li>

-

-<li>

-<b>extensions</b> - a comma separated list with file extensions on which the

-search page can operate. Each extension must also include a weight (0 meaning

-lowest weight) which enables the search infrastructure to find the best fitting

-page. The weight is separated from the extension by a colon.

-If a search page can search all possible resources then "*" can be used.</li>

-

-</ul>

-<b><i>Examples:</i></b>

-<p>The following is an example of a search page extension definition:

-<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.search.searchPages"&gt;</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;page</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.search.ui.text.TextSearchPage"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label="Text Search"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon="icons/full/obj16/tsearch_pref.gif"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeHint="250,160"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tabPosition="1"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="*:1"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.search.ui.text.TextSearchPage"</tt>

-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/page&gt;</tt>

-<br><tt>&nbsp;&nbsp; &lt;/extension&gt;</tt>

-

-<p><b><i>Supplied Implementation: </i></b>The search infrastructure provides

- a search page for full-text search.

-<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>

diff --git a/org.eclipse.search/doc/org_eclipse_search_searchResultSorters.html b/org.eclipse.search/doc/org_eclipse_search_searchResultSorters.html
deleted file mode 100644
index c3dcb0a4..0000000
--- a/org.eclipse.search/doc/org_eclipse_search_searchResultSorters.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!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>

diff --git a/org.eclipse.search/exportplugin.xml b/org.eclipse.search/exportplugin.xml
deleted file mode 100644
index fceaf85..0000000
--- a/org.eclipse.search/exportplugin.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<project name="org.eclipse.search" default="export" basedir=".">

-	<target name="init">

-		<tstamp/>

-		<property name="destdir" value="../../../plugin-export" />

-		<property name="plugin"  value="org.eclipse.search" />

-		<property name="dest"  value="${destdir}/${plugin}" />

-	</target>

-

-	<target name="build" depends="init">

-    	<incremental project="${plugin}" kind="incr"/>

-	</target>

-

-	<target name="export" depends="build">

-		<mkdir dir="${destdir}" />

-		<delete dir="${dest}" />

-		<mkdir dir="${dest}" />

-		<jar 

-			jarfile="${dest}/search.jar"

-			basedir="bin"

-		/>

-		<copy file="plugin.xml" todir="${dest}"/>

-		<copy file="plugin.properties" todir="${dest}"/>

-		<copy file="plugin.jars" todir="${dest}"/>

-		<copy todir="${dest}/icons">

-			<fileset dir="icons" />

-		</copy>

-	</target>

-</project>

diff --git a/org.eclipse.search/icons/basic/clcl16/search_goto.gif b/org.eclipse.search/icons/basic/clcl16/search_goto.gif
deleted file mode 100644
index 307ab22..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_history.gif b/org.eclipse.search/icons/basic/clcl16/search_history.gif
deleted file mode 100644
index 151fe13..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_next.gif b/org.eclipse.search/icons/basic/clcl16/search_next.gif
deleted file mode 100644
index b929a97..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_prev.gif b/org.eclipse.search/icons/basic/clcl16/search_prev.gif
deleted file mode 100644
index a718e63..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_rem.gif b/org.eclipse.search/icons/basic/clcl16/search_rem.gif
deleted file mode 100644
index acc5ec9..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_remall.gif b/org.eclipse.search/icons/basic/clcl16/search_remall.gif
deleted file mode 100644
index 2c069ab..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_sortmatch.gif b/org.eclipse.search/icons/basic/clcl16/search_sortmatch.gif
deleted file mode 100644
index 21dce81..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/clcl16/search_stop.gif b/org.eclipse.search/icons/basic/clcl16/search_stop.gif
deleted file mode 100644
index b7fff5a..0000000
--- a/org.eclipse.search/icons/basic/clcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/ctool16/search.gif b/org.eclipse.search/icons/basic/ctool16/search.gif
deleted file mode 100644
index 91a43f3..0000000
--- a/org.eclipse.search/icons/basic/ctool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/cview16/searchres.gif b/org.eclipse.search/icons/basic/cview16/searchres.gif
deleted file mode 100644
index e96afc6..0000000
--- a/org.eclipse.search/icons/basic/cview16/searchres.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_goto.gif b/org.eclipse.search/icons/basic/dlcl16/search_goto.gif
deleted file mode 100644
index eecc65d..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_history.gif b/org.eclipse.search/icons/basic/dlcl16/search_history.gif
deleted file mode 100644
index ee26f79..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_next.gif b/org.eclipse.search/icons/basic/dlcl16/search_next.gif
deleted file mode 100644
index 9fd9c8b..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_prev.gif b/org.eclipse.search/icons/basic/dlcl16/search_prev.gif
deleted file mode 100644
index 2910aee..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_rem.gif b/org.eclipse.search/icons/basic/dlcl16/search_rem.gif
deleted file mode 100644
index 5889e5c..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_remall.gif b/org.eclipse.search/icons/basic/dlcl16/search_remall.gif
deleted file mode 100644
index 7ace43e..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_sortmatch.gif b/org.eclipse.search/icons/basic/dlcl16/search_sortmatch.gif
deleted file mode 100644
index 0f6d53d..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dlcl16/search_stop.gif b/org.eclipse.search/icons/basic/dlcl16/search_stop.gif
deleted file mode 100644
index fbd9aa7..0000000
--- a/org.eclipse.search/icons/basic/dlcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/dtool16/search.gif b/org.eclipse.search/icons/basic/dtool16/search.gif
deleted file mode 100644
index 13bd2dd..0000000
--- a/org.eclipse.search/icons/basic/dtool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_goto.gif b/org.eclipse.search/icons/basic/elcl16/search_goto.gif
deleted file mode 100644
index 0d976c6..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_history.gif b/org.eclipse.search/icons/basic/elcl16/search_history.gif
deleted file mode 100644
index d1e6b85..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_next.gif b/org.eclipse.search/icons/basic/elcl16/search_next.gif
deleted file mode 100644
index 99b1385..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_prev.gif b/org.eclipse.search/icons/basic/elcl16/search_prev.gif
deleted file mode 100644
index e045ccd..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_rem.gif b/org.eclipse.search/icons/basic/elcl16/search_rem.gif
deleted file mode 100644
index 855f760..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_remall.gif b/org.eclipse.search/icons/basic/elcl16/search_remall.gif
deleted file mode 100644
index 33908b1..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_sortmatch.gif b/org.eclipse.search/icons/basic/elcl16/search_sortmatch.gif
deleted file mode 100644
index 2600790..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/elcl16/search_stop.gif b/org.eclipse.search/icons/basic/elcl16/search_stop.gif
deleted file mode 100644
index ee0cf74..0000000
--- a/org.eclipse.search/icons/basic/elcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/etool16/search.gif b/org.eclipse.search/icons/basic/etool16/search.gif
deleted file mode 100644
index 9090891..0000000
--- a/org.eclipse.search/icons/basic/etool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/eview16/searchres.gif b/org.eclipse.search/icons/basic/eview16/searchres.gif
deleted file mode 100644
index 9090891..0000000
--- a/org.eclipse.search/icons/basic/eview16/searchres.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/obj16/searchm_obj.gif b/org.eclipse.search/icons/basic/obj16/searchm_obj.gif
deleted file mode 100644
index 4a6a8f8..0000000
--- a/org.eclipse.search/icons/basic/obj16/searchm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/obj16/tsearch_dpdn_obj.gif b/org.eclipse.search/icons/basic/obj16/tsearch_dpdn_obj.gif
deleted file mode 100644
index a1c47a7..0000000
--- a/org.eclipse.search/icons/basic/obj16/tsearch_dpdn_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/basic/obj16/tsearch_obj.gif b/org.eclipse.search/icons/basic/obj16/tsearch_obj.gif
deleted file mode 100644
index d61816c..0000000
--- a/org.eclipse.search/icons/basic/obj16/tsearch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_goto.gif b/org.eclipse.search/icons/full/clcl16/search_goto.gif
deleted file mode 100644
index 307ab22..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_history.gif b/org.eclipse.search/icons/full/clcl16/search_history.gif
deleted file mode 100644
index 151fe13..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_next.gif b/org.eclipse.search/icons/full/clcl16/search_next.gif
deleted file mode 100644
index b929a97..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_prev.gif b/org.eclipse.search/icons/full/clcl16/search_prev.gif
deleted file mode 100644
index a718e63..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_rem.gif b/org.eclipse.search/icons/full/clcl16/search_rem.gif
deleted file mode 100644
index acc5ec9..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_remall.gif b/org.eclipse.search/icons/full/clcl16/search_remall.gif
deleted file mode 100644
index 2c069ab..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_sortmatch.gif b/org.eclipse.search/icons/full/clcl16/search_sortmatch.gif
deleted file mode 100644
index 21dce81..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/clcl16/search_stop.gif b/org.eclipse.search/icons/full/clcl16/search_stop.gif
deleted file mode 100644
index b7fff5a..0000000
--- a/org.eclipse.search/icons/full/clcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/ctool16/search.gif b/org.eclipse.search/icons/full/ctool16/search.gif
deleted file mode 100644
index 91a43f3..0000000
--- a/org.eclipse.search/icons/full/ctool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/cview16/searchres.gif b/org.eclipse.search/icons/full/cview16/searchres.gif
deleted file mode 100644
index e96afc6..0000000
--- a/org.eclipse.search/icons/full/cview16/searchres.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_goto.gif b/org.eclipse.search/icons/full/dlcl16/search_goto.gif
deleted file mode 100644
index eecc65d..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_history.gif b/org.eclipse.search/icons/full/dlcl16/search_history.gif
deleted file mode 100644
index ee26f79..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_next.gif b/org.eclipse.search/icons/full/dlcl16/search_next.gif
deleted file mode 100644
index 9fd9c8b..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_prev.gif b/org.eclipse.search/icons/full/dlcl16/search_prev.gif
deleted file mode 100644
index 2910aee..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_rem.gif b/org.eclipse.search/icons/full/dlcl16/search_rem.gif
deleted file mode 100644
index 5889e5c..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_remall.gif b/org.eclipse.search/icons/full/dlcl16/search_remall.gif
deleted file mode 100644
index 7ace43e..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_sortmatch.gif b/org.eclipse.search/icons/full/dlcl16/search_sortmatch.gif
deleted file mode 100644
index 0f6d53d..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dlcl16/search_stop.gif b/org.eclipse.search/icons/full/dlcl16/search_stop.gif
deleted file mode 100644
index fbd9aa7..0000000
--- a/org.eclipse.search/icons/full/dlcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/dtool16/search.gif b/org.eclipse.search/icons/full/dtool16/search.gif
deleted file mode 100644
index 13bd2dd..0000000
--- a/org.eclipse.search/icons/full/dtool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_goto.gif b/org.eclipse.search/icons/full/elcl16/search_goto.gif
deleted file mode 100644
index 0d976c6..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_goto.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_history.gif b/org.eclipse.search/icons/full/elcl16/search_history.gif
deleted file mode 100644
index d1e6b85..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_next.gif b/org.eclipse.search/icons/full/elcl16/search_next.gif
deleted file mode 100644
index 99b1385..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_prev.gif b/org.eclipse.search/icons/full/elcl16/search_prev.gif
deleted file mode 100644
index e045ccd..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_prev.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_rem.gif b/org.eclipse.search/icons/full/elcl16/search_rem.gif
deleted file mode 100644
index 855f760..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_rem.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_remall.gif b/org.eclipse.search/icons/full/elcl16/search_remall.gif
deleted file mode 100644
index 33908b1..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_remall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_sortmatch.gif b/org.eclipse.search/icons/full/elcl16/search_sortmatch.gif
deleted file mode 100644
index 2600790..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_sortmatch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/elcl16/search_stop.gif b/org.eclipse.search/icons/full/elcl16/search_stop.gif
deleted file mode 100644
index ee0cf74..0000000
--- a/org.eclipse.search/icons/full/elcl16/search_stop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/etool16/search.gif b/org.eclipse.search/icons/full/etool16/search.gif
deleted file mode 100644
index 9090891..0000000
--- a/org.eclipse.search/icons/full/etool16/search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/eview16/searchres.gif b/org.eclipse.search/icons/full/eview16/searchres.gif
deleted file mode 100644
index 9090891..0000000
--- a/org.eclipse.search/icons/full/eview16/searchres.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/obj16/searchm_obj.gif b/org.eclipse.search/icons/full/obj16/searchm_obj.gif
deleted file mode 100644
index 4a6a8f8..0000000
--- a/org.eclipse.search/icons/full/obj16/searchm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/obj16/tsearch_dpdn_obj.gif b/org.eclipse.search/icons/full/obj16/tsearch_dpdn_obj.gif
deleted file mode 100644
index a1c47a7..0000000
--- a/org.eclipse.search/icons/full/obj16/tsearch_dpdn_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/icons/full/obj16/tsearch_obj.gif b/org.eclipse.search/icons/full/obj16/tsearch_obj.gif
deleted file mode 100644
index d61816c..0000000
--- a/org.eclipse.search/icons/full/obj16/tsearch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/plugin.jars b/org.eclipse.search/plugin.jars
deleted file mode 100644
index 80a348f..0000000
--- a/org.eclipse.search/plugin.jars
+++ /dev/null
@@ -1 +0,0 @@
-search.jar=Eclipse Search
\ No newline at end of file
diff --git a/org.eclipse.search/plugin.properties b/org.eclipse.search/plugin.properties
deleted file mode 100644
index c4d34ff..0000000
--- a/org.eclipse.search/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#########################################

-# (c) Copyright IBM Corp. 2000, 2001.

-# All Rights Reserved.

-#########################################

-

-pluginName = Search Support

-

-searchMarker = Search Marker

-

-searchPages = Search Pages

-searchResultSorters = Search Result Sorters

-

-search = Search

-textSearch = Te&xt Search

-searchResultViewName = Search

-

-OpenSearchDialogAction.label = &Search...@Ctrl+H

-OpenSearchDialogAction.tooltip = Search

-

-MatchSorter.label = by &Match

-MatchSorter.tooltip = by Match

-ResourcenameSorter.label = by &Resource Name

-ResourcenameSorter.tooltip = by Resource Name

-ResourcePathSorter.label = by Resource &Path

-ResourcePathSorter.tooltip = by Resource Path

diff --git a/org.eclipse.search/plugin.xml b/org.eclipse.search/plugin.xml
deleted file mode 100644
index 013233d..0000000
--- a/org.eclipse.search/plugin.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<!-- ======================================================================= -->

-<!-- Search Plugin                                                           -->

-<!-- ======================================================================= -->

-<plugin

-	name="%pluginName"

-	id= "org.eclipse.search"

-	version= "1.0"

-	provider-name= "Object Technology International, Inc."

-	class= "org.eclipse.search.internal.ui.SearchPlugin">

-

-<requires>

-  <import plugin="org.apache.xerces"/>

-  <import plugin="org.eclipse.core.resources"/>

-  <import plugin="org.eclipse.ui"/>

-</requires>

-

-<runtime>

-	<library name="search.jar" >

-		<export name = "*"/>

-	</library>

-</runtime>

-

-

-<!-- Search extension point definitions -->

-

-<extension-point name="%searchPages" id="searchPages"/>

-<extension-point name="%searchResultSorters" id="searchResultSorters"/>

-

-

-<!-- Extensions -->

-

-<extension id="searchmarker" point="org.eclipse.core.resources.markers" name="%searchMarker">

-	<super type="org.eclipse.core.resources.textmarker"/>

-	<attribute name="line"/>

-</extension>

-

-<extension point="org.eclipse.ui.actionSets">

-	<actionSet

-		id="org.eclipse.search.searchActionSet"

-        label="%search"

-		visible="true">

-		<action id="org.eclipse.search.ui.OpenSearchDialogAction"

-			menubarPath="edit/find"

-			toolbarPath="Normal/Search"			

-			label="%OpenSearchDialogAction.label"

-			tooltip="%OpenSearchDialogAction.tooltip"

-			icon="icons/full/ctool16/search.gif"

-			class="org.eclipse.search.internal.ui.OpenSearchDialogAction"/>

-     </actionSet>

-</extension>

-

-<extension point="org.eclipse.ui.views">

-	<view

-	   id="org.eclipse.search.SearchResultView"

-	   name="%searchResultViewName"

-	   category="org.eclipse.ui"

-	   class="org.eclipse.search.internal.ui.SearchResultView"

-	   icon="icons/full/cview16/searchres.gif">

-	</view>

-</extension>

-

-<extension point="org.eclipse.search.searchPages">

-	<page

-		id="org.eclipse.search.internal.ui.text.TextSearchPage"

-		label="%textSearch"

-		icon="icons/full/obj16/tsearch_obj.gif"

-		sizeHint="250,160"

-		tabPosition="1"

-		extensions="*:1"

-		class="org.eclipse.search.internal.ui.text.TextSearchPage">

-	</page>

-</extension>

-

-<extension point="org.eclipse.search.searchResultSorters">

-	<sorter

-		id="org.eclipse.search.internal.ui.MatchSorter"

-		pageId="*"

-		label="%MatchSorter.label"

-		tooltip="%MatchSorter.tooltip"

-		icon="icons/full/clcl16/search_sortmatch.gif"

-		class="org.eclipse.search.internal.ui.MatchSorter">

-	</sorter>

-	<sorter

-		id="org.eclipse.search.internal.ui.ResourcenameSorter"

-		pageId="*"

-		label="%ResourcenameSorter.label"

-		tooltip="%ResourcenameSorter.tooltip"

-		icon="icons/full/clcl16/search_sortmatch.gif"

-		class="org.eclipse.search.internal.ui.ResourcenameSorter">

-	</sorter>

-	<sorter

-		id="org.eclipse.search.internal.ui.ResourcePathSorter"

-		pageId="*"

-		label="%ResourcePathSorter.label"

-		tooltip="%ResourcePathSorter.tooltip"

-		icon="icons/full/clcl16/search_sortmatch.gif"

-		class="org.eclipse.search.internal.ui.ResourcePathSorter">

-	</sorter>

-</extension>

-

-</plugin>
\ No newline at end of file
diff --git a/org.eclipse.search/search.jar b/org.eclipse.search/search.jar
deleted file mode 100644
index 83bc3a2..0000000
--- a/org.eclipse.search/search.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/ISearchScope.java b/org.eclipse.search/search/org/eclipse/search/internal/core/ISearchScope.java
deleted file mode 100644
index d4298bf..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/ISearchScope.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core;

-

-import org.eclipse.core.resources.IResource;

-

-/**

- * Defines a scope to which search results are limited.

- */

-public interface ISearchScope {

-

-	/**

-	 * Checks whether the given element is enclosed by

-	 * this scope or not.

-	 *

-	 * @param	element	the resource to be checked

-	 * @return	<code>true</code> if the resource is inside the search scope

-	 * 

-	 */

-	public boolean encloses(IResource element);

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/SearchScope.java b/org.eclipse.search/search/org/eclipse/search/internal/core/SearchScope.java
deleted file mode 100644
index 9e2c22f..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/SearchScope.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.IPath;

-

-/**

- * A default implementation of <code>ISearchScope</code>.

- */

-public class SearchScope implements ISearchScope {

-

-	private static class WorkbenchScope implements ISearchScope {

-	

-		WorkbenchScope() {

-		}

-		

-		/* 

-		 * Implements method from ISearchScope

-		 */

-		public boolean encloses(IResource element) {

-			return true;

-		}	

-

-		/* 

-		 * Implements method from ISearchScope

-		 */

-		public void add(IResource element) {

-			// nothing to be added

-		}	

-	}

-		

-	public static final ISearchScope WORKBENCH= new WorkbenchScope();

-	

-	private List fElements;

-

-	public SearchScope() {

-		fElements= new ArrayList(5);

-	}

-	

-	/**

-	 * @see ISearchScope#add(IResource)

-	 */

-	public void add(IResource element) {

-		fElements.add(element);

-	}

-	

-	/*

-	 * Implements method from ISearchScope

-	 */

-	public boolean encloses(IResource element) {

-		IPath elementPath= element.getFullPath();

-		Iterator iter= elements();

-		while (iter.hasNext()) {

-			IResource resource= (IResource)iter.next();

-			if (resource.getFullPath().isPrefixOf(elementPath))

-				return true;

-		}

-		return false;

-	}

-	

-	/**

-	 * Returns the search scope elements

-	 */

-	protected Iterator elements() {

-		return fElements.iterator();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/AmountOfWorkCalculator.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/AmountOfWorkCalculator.java
deleted file mode 100644
index d960567..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/AmountOfWorkCalculator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import java.util.Collection;

-import java.util.Iterator;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.internal.core.ISearchScope;

-

-/**

- * The visitor that does the actual work.

- */

-public class AmountOfWorkCalculator extends TypedResourceVisitor {

-	private ISearchScope fScope;

-	private int fResult;

-		

-	protected boolean visitFile(IFile file) throws CoreException {

-		if (fScope.encloses(file))

-			fResult++;

-		return true;	

-	}

-	

-	public int process(Collection projects, ISearchScope scope) throws CoreException {

-		fResult= 0;

-		fScope= scope;

-		

-		Iterator i= projects.iterator();

-		while(i.hasNext()) {

-			IProject project= (IProject)i.next();

-			int save= fResult;

-			project.accept(this);

-			// Project doesn't contain any files that are in scope

-			if (save == fResult)

-				i.remove();	

-		}

-		

-		return fResult;

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/ITextSearchResultCollector.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/ITextSearchResultCollector.java
deleted file mode 100644
index dc34f29..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/ITextSearchResultCollector.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-

-public interface ITextSearchResultCollector {

-

-	/**

-	 * Returns the progress monitor used to setup and report progress.

-	 */

-	public IProgressMonitor getProgressMonitor();

-	

-	/**

-	 * Called before the actual search starts.

-	 */

-	public void aboutToStart() throws CoreException;

-	 

-	/**

-	 * Accepts the given search result.

-	 * @param resource the resource in which the match has been found.

-	 * @param line the line containing the match

-	 * @param int start position from the beginning of the file. Start position

-	 *  is zero based.

-	 * @param length the length of the match.

-	 * @param lineNumber the line number of the match.

-	 */

-	public void accept(IResource resource, String line, int start, int length, int lineNumber) throws CoreException;

-	

-	/**

-	 * Called when the search has ended.

-	 */

-	public void done() throws CoreException; 	

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchEngine.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchEngine.java
deleted file mode 100644
index 555a236..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchEngine.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.eclipse.jface.util.Assert;

-

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-

-import org.eclipse.search.internal.core.ISearchScope;

-import org.eclipse.search.internal.ui.SearchMessages;

-import org.eclipse.search.internal.ui.SearchPlugin;

-

-public class TextSearchEngine {

-	

-	/**

-	 * Search for the given pattern.

-	 */

-	public void search(IWorkspace workspace, String pattern, String options, ISearchScope scope, 

-			ITextSearchResultCollector collector) throws CoreException {

-				

-		Assert.isNotNull(workspace);

-		Assert.isNotNull(pattern);

-		Assert.isNotNull(scope);

-		Assert.isNotNull(collector);

-		

-		IProgressMonitor monitor= collector.getProgressMonitor();

-		

-		IProject[] projects= workspace.getRoot().getProjects();

-		Collection openProjects= new ArrayList(10);

-		for (int i= 0; i < projects.length; i++) {

-			IProject project= projects[i];

-			if (project.isOpen())

-				openProjects.add(project);

-		}

-		if (!openProjects.isEmpty()) {

-			int amountOfWork= (new AmountOfWorkCalculator()).process(openProjects, scope);		

-			try {

-				monitor.beginTask(SearchMessages.getString("TextSearchEngine.scanning"), amountOfWork); //$NON-NLS-1$

-				collector.aboutToStart();

-				TextSearchVisitor visitor= new TextSearchVisitor(pattern, options,

-					scope, collector);

-				visitor.process(openProjects);	

-			} finally {

-				monitor.done();

-				collector.done();

-			}

-		}

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchScope.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchScope.java
deleted file mode 100644
index 7d8d105..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchScope.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.Set;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IResource;

-

-import org.eclipse.search.internal.core.SearchScope;

-import org.eclipse.search.internal.ui.util.StringMatcher;

-

-/**

- * A special text search scope that take file extensions into account.

- */

-public class TextSearchScope extends SearchScope {

-	

-	private static class WorkspaceScope extends TextSearchScope {

-	

-		public void add(IResource element) {

-			// do nothing

-		}

-		

-		/**

-		 * @see ISearchScope#encloses(Object)

-		 */

-		public boolean encloses(IResource element) {

-			if (element instanceof IFile && skipFile((IFile)element))

-				return false;

-			return true;	

-		}	

-	}

-	

-	private Set fExtensions= new HashSet(3);

-	

-	/**

-	 * Adds an extension to the scope.

-	 */

-	public void addExtension(String extension) {

-		fExtensions.add(new StringMatcher(extension, false, false));

-	}

-	/**

-	 * Adds all string patterns contained in <code>extensions</code> to this

-	 * scope. The allowed pattern characters are <code>*</code> for any character

-	 * and <code>?</code> for one character.

-	 */

-	public void addExtensions(Set extensions) {

-		if (extensions == null)

-			return;

-		Iterator iter= extensions.iterator();

-		while (iter.hasNext()) {

-			Object obj= iter.next();

-			if (obj instanceof String)

-				addExtension((String)obj);

-		}

-	}  

-	/*

-	 * Implements method from ISearchScope

-	 */

-	public boolean encloses(IResource element) {

-		if (element instanceof IFile && skipFile((IFile)element))

-			return false;

-		return super.encloses(element);	

-	}

-	/**

-	 * Returns a new Workbench scope.

-	 */

-	public static TextSearchScope newWorkspaceScope() {

-		return new WorkspaceScope();

-	}

-		

-	boolean skipFile(IFile file) {

-		if (file != null) {

-			Iterator iter= fExtensions.iterator();

-			while (iter.hasNext()) {

-				if (((StringMatcher)iter.next()).match(file.getName()))

-					return false;

-			}

-		}

-		return true;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
deleted file mode 100644
index 4f9fab5..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import java.io.BufferedReader;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.util.Collection;

-import java.util.Iterator;

-

-import org.eclipse.jface.text.Position;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.OperationCanceledException;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.core.runtime.Status;

-

-import org.eclipse.search.internal.core.ISearchScope;

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.internal.ui.util.StringMatcher;

-import org.eclipse.search.ui.SearchUI;

-import org.eclipse.search.internal.ui.SearchMessages;

-

-/**

- * The visitor that does the actual work.

- */

-public class TextSearchVisitor extends TypedResourceVisitor {

-	protected static final int fgLF= '\n';

-	protected static final int fgCR= '\r';

-

-	private String fPattern;

-	private ISearchScope fScope;

-	private ITextSearchResultCollector fCollector;

-	private String fOptions;

-		

-	private IProgressMonitor fProgressMonitor;

-	private StringMatcher fMatcher;

-	private String fErrorMessage;

-	

-	protected int fPushbackChar;

-	protected boolean fPushback;

-	

-	

-	public TextSearchVisitor(String pattern, String options, ISearchScope scope, ITextSearchResultCollector collector) 

-			throws CoreException {

-		fPattern= pattern;

-		fScope= scope;

-		fCollector= collector;

-		fPushback= false;

-		if (options != null)

-			fOptions= options;

-		else

-			fOptions= "";	 //$NON-NLS-1$

-		

-

-		fProgressMonitor= collector.getProgressMonitor();

-		

-		fMatcher= new StringMatcher(pattern, options.indexOf('i') != -1, false);

-	}

-	

-	public void process(Collection projects) throws CoreException {

-		Iterator i= projects.iterator();

-		while(i.hasNext()) {

-			IProject project= (IProject)i.next();

-			project.accept(this);

-		}

-	}

-	

-	protected boolean visitFile(IFile file) throws CoreException {

-		if (! fScope.encloses(file))

-			return false;

-			

-		try {

-			InputStream stream= file.getContents(false);

-			BufferedReader reader= new BufferedReader(new InputStreamReader(stream));

-			StringBuffer sb= new StringBuffer(100);

-			int lineCounter= 1;

-			int charCounter=0;

-			boolean eof= false;

-			try {

-				while (!eof) {

-					int eolStrLength= readLine(reader, sb);

-					int lineLength= sb.length();

-					int start= 0;

-					eof= eolStrLength == -1;

-					String line= sb.toString();

-					StringMatcher.Position match;

-					while (start < lineLength) {

-						if ((match= fMatcher.find(line, start, lineLength)) != null) {

-							start= charCounter + match.getStart();

-							int length= match.getEnd() - match.getStart();

-							fCollector.accept(file, line.trim(), start, length, lineCounter);

-							start= match.getEnd();

-						}

-						else	// no match in this line

-							start= lineLength;

-					}

-					charCounter+= lineLength + eolStrLength;

-					lineCounter++;

-				}

-			} finally {

-				if (reader != null)

-					reader.close();

-			}

-		} catch (IOException e) {

-			String message= SearchMessages.getFormattedString("TextSearchVisitor.error", file.getFullPath()); //$NON-NLS-1$

-			throw new CoreException(new Status(IStatus.ERROR, SearchUI.PLUGIN_ID, Platform.PLUGIN_ERROR, message, e));

-		}

-		finally {

-			fProgressMonitor.worked(1);

-			if (fProgressMonitor.isCanceled())

-				throw new OperationCanceledException(SearchMessages.getString("TextSearchVisitor.canceled")); //$NON-NLS-1$

-		}		

-		return true;

-	}

-	

-	protected int readLine(BufferedReader reader, StringBuffer sb) throws IOException {

-		int ch= -1;

-		sb.setLength(0);

-		if (fPushback) {

-			ch= fPushbackChar;

-			fPushback= false;

-		}

-		else

-			ch= reader.read();

-		while (ch >= 0) {

-			if (ch == fgLF)

-				return 1;

-			if (ch == fgCR) {

-				ch= reader.read();

-				if (ch == fgLF)

-					return 2;

-				else {

-					fPushbackChar= ch;

-					fPushback= true;

-					return 1;

-				}

-			}

-			sb.append((char)ch);

-			ch= reader.read();

-		}

-		return -1;

-	}

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TypedResourceVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TypedResourceVisitor.java
deleted file mode 100644
index e75cdb2..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TypedResourceVisitor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.core.text;

-

-import org.eclipse.jface.util.Assert;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IResourceVisitor;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.search.internal.ui.SearchMessages;

-

-public class TypedResourceVisitor implements IResourceVisitor {

-

-	public boolean visit(IResource resource) throws CoreException {

-		switch(resource.getType()) {

-			case IResource.FILE:

-				return visitFile((IFile)resource);

-			case IResource.FOLDER:

-				return visitFolder((IFolder)resource);

-			case IResource.PROJECT:

-				return visitProject((IProject)resource);

-			default:

-				Assert.isTrue(false, SearchMessages.getString("TypedResourceVisitor.unknownResourceType")); //$NON-NLS-1$

-		}

-		return false;

-	}

-

-	protected boolean visitProject(IProject project) throws CoreException {

-		return true;

-	}

-	

-	protected boolean visitFolder(IFolder folder) throws CoreException {

-		return true;

-	}

-	

-	protected boolean visitFile(IFile file) throws CoreException {

-		return true;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/GotoMarkerAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/GotoMarkerAction.java
deleted file mode 100644
index 575317c..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/GotoMarkerAction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-class GotoMarkerAction extends Action {

-	

-	private SearchResultViewer fViewer;

-

-	public GotoMarkerAction(SearchResultViewer viewer) {

-		super(SearchMessages.getString("SearchResultView.gotoMarker.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_GOTO);

-		setToolTipText(SearchMessages.getString("SearchResultView.gotoMarker.tooltip")); //$NON-NLS-1$

-		fViewer= viewer;

-	}

-	

-	public void run() {

-		fViewer.showResult();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ISearchHelpContextIds.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ISearchHelpContextIds.java
deleted file mode 100644
index 8684ef9..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ISearchHelpContextIds.java
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/MatchSorter.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/MatchSorter.java
deleted file mode 100644
index 1d3f56c..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/MatchSorter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.viewers.ContentViewer;

-import org.eclipse.jface.viewers.IBaseLabelProvider;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.jface.viewers.ViewerSorter;

-

-/**

- * Sorts the search result viewer by the match as 

- * delivered by the viewers label provider.

- */

-public class MatchSorter extends ViewerSorter {

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public int compare(Viewer viewer, Object e1, Object e2) {

-		String name1;

-		String name2;

-		

-		if (!(viewer instanceof ContentViewer)) {

-			name1= e1.toString();

-			name2= e2.toString();

-		} else {

-			IBaseLabelProvider prov= ((ContentViewer) viewer).getLabelProvider();

-			if (prov instanceof ILabelProvider) {

-				ILabelProvider lprov= (ILabelProvider) prov;

-				name1= lprov.getText(e1);

-				name2= lprov.getText(e2);

-			} else {

-				name1= e1.toString();

-				name2= e2.toString();

-			}

-		}

-		if (name1 == null)

-			name1= ""; //$NON-NLS-1$

-		if (name2 == null)

-			name2= ""; //$NON-NLS-1$

-

-		return name1.toLowerCase().compareTo(name2.toLowerCase());

-	}

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public boolean isSorterProperty(Object element, String property) {

-		return true;

-	}

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenSearchDialogAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenSearchDialogAction.java
deleted file mode 100644
index 3dc348b..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/OpenSearchDialogAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.viewers.ISelection;

-

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.IWorkbenchWindowActionDelegate;

-

-/**

- * Opens the Search Dialog.

- */

-public class OpenSearchDialogAction extends Action implements IWorkbenchWindowActionDelegate {

-	private IWorkbenchWindow fWindow;

-

-	public OpenSearchDialogAction() {

-		super(SearchMessages.getString("OpenSearchDialogAction.label")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_TOOL, SearchPluginImages.IMG_TOOL_SEARCH);

-		setToolTipText(SearchMessages.getString("OpenSearchDialogAction.tooltip")); //$NON-NLS-1$

-	}

-

-	public void init(IWorkbenchWindow window) {

-		fWindow= window;

-	}

-

-	public void run(IAction action) {

-		run();

-	}

-

-	public void run() {

-		if (getWindow().getActivePage() == null) {

-			SearchPlugin.beep();

-			return;

-		}

-		SearchDialog dialog= new SearchDialog(

-			getWindow().getShell(),

-			SearchPlugin.getWorkspace(),

-			getSelection(),

-			getEditorPart());

-		dialog.open();

-	}

-

-	public void selectionChanged(IAction action, ISelection selection) {

-		// do nothing since the action isn't selection dependent.

-	}

-

-	private ISelection getSelection() {

-		return getWindow().getSelectionService().getSelection();

-	}

-	

-	private IEditorPart getEditorPart() {

-		return getWindow().getActivePage().getActiveEditor();

-	}

-

-	private IWorkbenchWindow getWindow() {

-		if (fWindow == null)

-			fWindow= SearchPlugin.getActiveWorkbenchWindow();

-		return fWindow;

-	}

-

-	public void dispose() {

-		fWindow= null;

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllResultsAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllResultsAction.java
deleted file mode 100644
index 4f70cf3..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllResultsAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.SearchUI;

-

-class RemoveAllResultsAction extends Action {

-

-	public RemoveAllResultsAction() {

-		super(SearchMessages.getString("SearchResultView.removeAllResults.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_REM_ALL);

-		setToolTipText(SearchMessages.getString("SearchResultView.removeAllResults.tooltip")); //$NON-NLS-1$

-	}

-	

-	public void run() {

-		try {

-			SearchPlugin.getWorkspace().getRoot().deleteMarkers(SearchUI.SEARCH_MARKER, true, IResource.DEPTH_INFINITE);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllSearchesAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllSearchesAction.java
deleted file mode 100644
index d15a359..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveAllSearchesAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-class RemoveAllSearchesAction extends Action {

-

-	public RemoveAllSearchesAction() {

-		super(SearchMessages.getString("SearchResultView.removeAllSearches.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_REM_ALL);

-		setToolTipText(SearchMessages.getString("SearchResultView.removeAllSearches.tooltip")); //$NON-NLS-1$

-	}

-	

-	public void run() {

-		SearchManager.getDefault().removeAllSearches();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveMatchAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveMatchAction.java
deleted file mode 100644
index eb73643..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveMatchAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.Iterator;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.ISelectionProvider;

-import org.eclipse.jface.viewers.IStructuredSelection;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-class RemoveMatchAction extends Action {

-

-	private ISelectionProvider fSelectionProvider;

-

-	public RemoveMatchAction(ISelectionProvider provider) {

-		super(SearchMessages.getString("SearchResultView.removeMatch.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_REM);

-		setToolTipText(SearchMessages.getString("SearchResultView.removeMatch.tooltip")); //$NON-NLS-1$

-		fSelectionProvider= provider;

-	}

-	

-	public void run() {

-		IMarker[] markers= getMarkers(fSelectionProvider.getSelection());

-		if (markers != null)

-			try {

-				SearchPlugin.getWorkspace().deleteMarkers(markers);

-			} catch (CoreException ex) {

-				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			}

-	}

-	

-	private IMarker[] getMarkers(ISelection s) {

-		if (! (s instanceof IStructuredSelection) || s.isEmpty())

-			return null;

-		

-		IStructuredSelection selection= (IStructuredSelection)s;

-		int size= selection.size();

-		if (size != 1)

-			return null;

-		if (selection.getFirstElement() instanceof ISearchResultViewEntry) {

-			IMarker marker= ((ISearchResultViewEntry)selection.getFirstElement()).getSelectedMarker();

-			if (marker != null)

-				return new IMarker[] {marker};

-		}

-		return null;

-		/*

-		Iterator iter= selection.iterator();

-		for(int i= 0; iter.hasNext(); i++) {

-			ISearchResultViewEntry entry= (ISearchResultViewEntry)iter.next();

-			result[i]= entry.getSelectedMarker();

-		}

-		return result;

-		*/

-		

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveResultAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveResultAction.java
deleted file mode 100644
index 7040ebf..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/RemoveResultAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.Iterator;

-import java.util.ArrayList;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.ISelectionProvider;

-import org.eclipse.jface.viewers.IStructuredSelection;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-class RemoveResultAction extends Action {

-

-	private ISelectionProvider fSelectionProvider;

-

-	public RemoveResultAction(ISelectionProvider provider) {

-		fSelectionProvider= provider;

-		if (getSelectedEntriesCount() > 1) {

-			setText(SearchMessages.getString("SearchResultView.removeEntries.text")); //$NON-NLS-1$

-			setToolTipText(SearchMessages.getString("SearchResultView.removeEntries.tooltip")); //$NON-NLS-1$

-		}

-		else {

-			setText(SearchMessages.getString("SearchResultView.removeEntry.text")); //$NON-NLS-1$

-			setToolTipText(SearchMessages.getString("SearchResultView.removeEntry.tooltip")); //$NON-NLS-1$

-		}

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_REM);

-	}

-	

-	public void run() {

-		IMarker[] markers= getMarkers(fSelectionProvider.getSelection());

-		if (markers != null)

-			try {

-				SearchPlugin.getWorkspace().deleteMarkers(markers);

-			} catch (CoreException ex) {

-				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			}

-	}

-	

-	private IMarker[] getMarkers(ISelection s) {

-		if (! (s instanceof IStructuredSelection) || s.isEmpty())

-			return null;

-		

-		IStructuredSelection selection= (IStructuredSelection)s;

-		int size= selection.size();

-		if (size <= 0)

-			return null;

-		ArrayList markers= new ArrayList(size * 3);

-		int markerCount= 0;

-		Iterator iter= selection.iterator();

-		for(int i= 0; iter.hasNext(); i++) {

-			SearchResultViewEntry entry= (SearchResultViewEntry)iter.next();

-			markerCount += entry.getMatchCount();

-			markers.addAll(entry.getMarkers());

-		}

-		return (IMarker[])markers.toArray(new IMarker[markerCount]);

-	}

-

-	protected int getSelectedEntriesCount() {

-		ISelection s= fSelectionProvider.getSelection();

-		if (s == null || s.isEmpty() || !(s instanceof IStructuredSelection))

-			return 0;

-		IStructuredSelection selection= (IStructuredSelection)s;

-		return selection.size();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcePathSorter.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcePathSorter.java
deleted file mode 100644
index 69a0d0c..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcePathSorter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.jface.viewers.ViewerSorter;

-

-import org.eclipse.core.resources.IResource;

-

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-/**

- * Sorts the search result viewer by the resource name.

- */

-public class ResourcePathSorter extends ViewerSorter {

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public int compare(Viewer viewer, Object e1, Object e2) {

-		String name1= null;

-		String name2= null;

-		if (e1 instanceof ISearchResultViewEntry)

-			name1= ((ISearchResultViewEntry)e1).getResource().getFullPath().toString();

-		if (e2 instanceof ISearchResultViewEntry)

-			name2= ((ISearchResultViewEntry)e2).getResource().getFullPath().toString();

-		if (name1 == null)

-			name1= ""; //$NON-NLS-1$

-		if (name2 == null)

-			name2= ""; //$NON-NLS-1$

-		return name1.toLowerCase().compareTo(name2.toLowerCase());

-	}

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public boolean isSorterProperty(Object element, String property) {

-		return true;

-	}

-}

-	
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcenameSorter.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcenameSorter.java
deleted file mode 100644
index cbff855..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ResourcenameSorter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.jface.viewers.ViewerSorter;

-

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-/**

- * Sorts the search result viewer by the resource path.

- */

-public class ResourcenameSorter extends ViewerSorter {

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public int compare(Viewer viewer, Object e1, Object e2) {

-		String name1= null;

-		String name2= null;

-		if (e1 instanceof ISearchResultViewEntry)

-			name1= ((ISearchResultViewEntry)e1).getResource().getName();

-		if (e2 instanceof ISearchResultViewEntry)

-			name2= ((ISearchResultViewEntry)e2).getResource().getName();

-		if (name1 == null)

-			name1= ""; //$NON-NLS-1$

-		if (name2 == null)

-			name2= ""; //$NON-NLS-1$

-		return name1.toLowerCase().compareTo(name2.toLowerCase());

-	}

-	/*

-	 * Overrides method from ViewerSorter

-	 */

-	public boolean isSorterProperty(Object element, String property) {

-		return true;

-	}

-}

-	
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/Search.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/Search.java
deleted file mode 100644
index 4c9bbf9..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/Search.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.lang.reflect.InvocationTargetException;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.swt.widgets.Shell;

-

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.dialogs.ProgressMonitorDialog;

-import org.eclipse.jface.operation.IRunnableWithProgress;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.util.Assert;

-import org.eclipse.jface.viewers.ILabelProvider;

-

-import org.eclipse.core.resources.IWorkspaceDescription;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.IContextMenuContributor;

-import org.eclipse.search.ui.IGroupByKeyComputer;

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-class Search extends Object {

-	private String fPageId;

-	private String fDescription;

-	private ImageDescriptor fImageDescriptor;

-	private ILabelProvider fLabelProvider;

-	private ArrayList fResults;

-	private IAction fGotoMarkerAction;

-	private IContextMenuContributor fContextMenuContributor;

-	private IGroupByKeyComputer	fGroupByKeyComputer;

-	private IRunnableWithProgress fOperation;

-

-

-	public Search(String pageId, String description, ILabelProvider labelProvider, ImageDescriptor imageDescriptor, IAction gotoMarkerAction, IContextMenuContributor contextMenuContributor, IGroupByKeyComputer groupByKeyComputer, IRunnableWithProgress operation) {

-		fPageId= pageId;

-		fDescription= description;

-		fImageDescriptor= imageDescriptor;

-		fLabelProvider= labelProvider;

-		fGotoMarkerAction= gotoMarkerAction;

-		fContextMenuContributor= contextMenuContributor;

-		fGroupByKeyComputer= groupByKeyComputer;

-		fOperation= operation;

-	}

-	/**

-	 * Returns the full description of the search.

-	 * The description set by the client where

-	 * {0} will be replaced by the match count.

-	 */

-	String getFullDescription() {

-		if (fDescription == null)

-			return ""; //$NON-NLS-1$

-

-		String text= fDescription;

-		int i= fDescription.lastIndexOf("{0}"); //$NON-NLS-1$

-		if (i != -1) {

-			// replace "{0}" with the match count

-			int count= getItemCount();

-			text= fDescription.substring(0, i);

-			text += count;

-			// cut away last 's' if count is 1

-			if (count == 1 && fDescription.lastIndexOf('s') == (fDescription.length() - 1))

-				text += fDescription.substring(i + 3, fDescription.length() - 1);

-			else

-			 	text += fDescription.substring(i + 3);

-		}

-		return text;

-	}

-	/**

-	 * Returns a short description of the search.

-	 * Cuts off after 30 characters and adds ...

-	 * The description set by the client where

-	 * {0} will be replaced by the match count.

-	 */

-	String getShortDescription() {

-		if (fDescription == null)

-			return ""; //$NON-NLS-1$

-

-		String text= fDescription;

-		int i= fDescription.lastIndexOf("{0}"); //$NON-NLS-1$

-		if (i != -1) {

-			// replace "{0}" with the match count

-			int count= getItemCount();

-			// minimize length infront of " - " to 20 and add ...

-			if (i > 20 + 3) {

-				if (fDescription.indexOf('"') == 0 && fDescription.indexOf('"', 1) == i - 4)

-					text= fDescription.substring(0, 21) + "\"... - "; //$NON-NLS-1$

-				else

-					text= fDescription.substring(0, 20) + "... - "; //$NON-NLS-1$

-			}

-			else

-				text= fDescription.substring(0, i);

-			text += count;

-			// cut away last 's' if count is 1

-			if (count == 1 && fDescription.lastIndexOf('s') == (fDescription.length() - 1))

-				text += fDescription.substring(i + 3, fDescription.length() - 1);

-			else

-			 	text += fDescription.substring(i + 3);

-		}

-		else {

-			// minimize length to 30 and add ...

-			if (fDescription.length() > 30)

-				text= fDescription.substring(0, 30) + "... "; //$NON-NLS-1$

-		}

-		return text;

-	}

-

-	/** Image used when search is displayed in a list */

-	ImageDescriptor getImageDescriptor() {

-		return fImageDescriptor;

-	}

-

-	int getItemCount() {

-		int count= 0;

-		Iterator iter= getResults().iterator();

-		while (iter.hasNext())

-			count += ((ISearchResultViewEntry)iter.next()).getMatchCount();

-		return count;

-	}

-

-	List getResults() {

-		if (fResults == null)

-			return new ArrayList();

-		return fResults;

-	}

-

-	ILabelProvider getLabelProvider() {

-		return fLabelProvider;

-	}

-

-	void searchAgain() {

-		if (fOperation == null)

-			return;

-		Shell shell= SearchPlugin.getActiveWorkbenchShell();

-		IWorkspaceDescription workspaceDesc= SearchPlugin.getWorkspace().getDescription();

-		boolean isAutoBuilding= workspaceDesc.isAutoBuilding();

-		if (isAutoBuilding)

-			// disable auto-build during search operation

-			SearchPlugin.setAutoBuilding(false);

-		try {

-			new ProgressMonitorDialog(shell).run(true, true, fOperation);

-		} catch (InvocationTargetException ex) {

-			ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.search.title"), SearchMessages.getString("Search.Error.search.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		} catch(InterruptedException e) {

-		} finally {

-			if (isAutoBuilding)

-				// enable auto-building again

-				SearchPlugin.setAutoBuilding(true);

-		}

-	}

-	

-	boolean isSameSearch(Search search) {

-		return search != null && search.getOperation() == fOperation;

-	}

-	

-	void backupMarkers() {

-		Iterator iter= getResults().iterator();

-		while (iter.hasNext()) {

-			((SearchResultViewEntry)iter.next()).backupMarkers();

-		}

-	}

-

-	String getPageId() {

-		return fPageId;

-	}

-	

-	IGroupByKeyComputer getGroupByKeyComputer() {

-		return fGroupByKeyComputer;

-	}

-

-	IRunnableWithProgress getOperation() {

-		return fOperation;

-	}

-

-	IAction getGotoMarkerAction() {

-		return fGotoMarkerAction;

-	}

-

-	IContextMenuContributor getContextMenuContributor() {

-		return fContextMenuContributor;

-	}

-	

-	public void removeResults() {

-		fResults= null;

-	}

-	

-	void setResults(ArrayList results) {

-		Assert.isNotNull(results);

-		fResults= results;

-	}

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchAgainAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchAgainAction.java
deleted file mode 100644
index 6d3a658..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchAgainAction.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-class SearchAgainAction extends Action {

-

-	public SearchAgainAction() {

-		super(SearchMessages.getString("SearchResultView.searchAgain.text")); //$NON-NLS-1$

-		setToolTipText(SearchMessages.getString("SearchResultView.searchAgain.tooltip")); //$NON-NLS-1$

-	}

-	

-	public void run() {

-		Search selected= SearchManager.getDefault().getCurrentSearch();

-		if (selected != null)

-			selected.searchAgain();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
deleted file mode 100644
index 534ab37..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDropDownAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDropDownAction.java
deleted file mode 100644
index 7b5f0b2..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDropDownAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.Iterator;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Menu;

-import org.eclipse.swt.widgets.MenuItem;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.action.ActionContributionItem;

-import org.eclipse.jface.action.IMenuCreator;

-

-class SearchDropDownAction extends Action implements IMenuCreator {

-

-

-	public static final int RESULTS_IN_DROP_DOWN= 10;

-

-	private SearchResultViewer fViewer;

-	

-	public SearchDropDownAction(SearchResultViewer viewer) {

-		fViewer= viewer;

-		setText(SearchMessages.getString("SearchResultView.previousSearches.text")); //$NON-NLS-1$

-		setToolTipText(SearchMessages.getString("SearchResultView.previousSearches.tooltip")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_HISTORY);

-		setMenuCreator(this);

-	}

-

-	public void dispose() {

-		fViewer= null;

-	}

-

-	public Menu getMenu(Menu parent) {

-		return null;

-	}

-

-	public Menu getMenu(Control parent) {

-		Menu menu= new Menu(parent);

-		boolean checkedOne= false;

-		Iterator iter= SearchManager.getDefault().getPreviousSearches().iterator();

-		Search selected= SearchManager.getDefault().getCurrentSearch();

-		int i= 0;

-		while (iter.hasNext() && i++ < RESULTS_IN_DROP_DOWN) {

-			Search search= (Search)iter.next();

-			ShowSearchAction action= new ShowSearchAction(search);

-			action.setChecked(search.equals(selected));

-			if (search.equals(selected))

-				checkedOne= true;

-			addActionToMenu(menu, action);

-		}

-		if (iter.hasNext()) {

-			new MenuItem(menu, SWT.SEPARATOR);

-			Action others= new ShowSearchesAction();

-			others.setChecked(!checkedOne);

-			addActionToMenu(menu, others);

-		}

-		return menu;

-	}

-

-	protected void addActionToMenu(Menu parent, Action action) {

-		ActionContributionItem item= new ActionContributionItem(action);

-		item.fill(parent, -1);

-	}

-

-	public void run() {

-			new ShowSearchesAction().run(true);

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
deleted file mode 100644
index de11b56..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
+++ /dev/null
@@ -1,487 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.lang.reflect.InvocationTargetException;

-import java.util.ArrayList;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.LinkedList;

-import java.util.Map;

-

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-

-import org.eclipse.jface.dialogs.ProgressMonitorDialog;

-import org.eclipse.jface.dialogs.MessageDialog;

-import org.eclipse.jface.util.Assert;

-import org.eclipse.jface.viewers.Viewer;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IMarkerDelta;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IResourceChangeEvent;

-import org.eclipse.core.resources.IResourceChangeListener;

-import org.eclipse.core.resources.IResourceDelta;

-import org.eclipse.core.resources.IResourceDeltaVisitor;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.ui.actions.WorkspaceModifyOperation;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.SearchUI;

-

-/**

- * Manage search results

- */

-public class SearchManager implements IResourceChangeListener {

-

-	static final SearchManager fgDefault= new SearchManager();

-	

-	Search fCurrentSearch= null;

-	

-	private SearchManager() {

-		SearchPlugin.getWorkspace().addResourceChangeListener(this);

-	}

-	

-	private HashSet fListeners= new HashSet();

-	private LinkedList fPreviousSearches= new LinkedList();

-	private boolean fIsNewSearch= false;

-	

-	public static SearchManager getDefault() {

-		return fgDefault;

-	}

-	

-	/**

-	 * Returns the list with previous searches (ISearch).

-	 */

-	LinkedList getPreviousSearches() {

-		return fPreviousSearches;

-	}

-	/**

-	 * Returns the list with current (last) results

-	 */

-	ArrayList getCurrentResults() {

-		if (fCurrentSearch == null)

-			return new ArrayList(0);

-		else

-			return (ArrayList)fCurrentSearch.getResults();

-	}

-

-	Search getCurrentSearch() {

-		return fCurrentSearch;

-	}

-

-	void removeAllSearches() {

-		SearchPlugin.getWorkspace().removeResourceChangeListener(this);

-		WorkspaceModifyOperation op= new WorkspaceModifyOperation() {

-			protected void execute(IProgressMonitor monitor) throws CoreException {

-				monitor.beginTask(SearchMessages.getString("SearchManager.updating"), 100); //$NON-NLS-1$

-				SearchPlugin.getWorkspace().getRoot().deleteMarkers(SearchUI.SEARCH_MARKER, true, IResource.DEPTH_INFINITE);

-				monitor.worked(100);

-				monitor.done();

-			}

-		};

-		boolean isAutoBuilding= SearchPlugin.getWorkspace().isAutoBuilding();

-		if (isAutoBuilding)

-			// disable auto-build during search operation

-			SearchPlugin.setAutoBuilding(false);

-		try {

-			ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());

-			dialog.run(true, true, op);

-		} catch (InvocationTargetException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		} catch (InterruptedException e) {

-			// Do nothing. Operation has been canceled.

-		} finally {

-			SearchPlugin.getWorkspace().addResourceChangeListener(this);

-			if (isAutoBuilding)

-				// enable auto-building again

-				SearchPlugin.setAutoBuilding(true);				

-		}

-

-		// clear searches

-		fPreviousSearches= new LinkedList();

-		fCurrentSearch= null;

-

-		// update viewers

-		Iterator iter= fListeners.iterator();

-		while (iter.hasNext()) {

-			SearchResultViewer viewer= (SearchResultViewer)iter.next();

-			viewer.setInput(null);

-		}

-	}

-

-	void setCurrentSearch(final Search search) {

-		if (fCurrentSearch == search)

-			return;

-		SearchPlugin.getWorkspace().removeResourceChangeListener(this);

-		WorkspaceModifyOperation op= new WorkspaceModifyOperation() {

-			protected void execute(IProgressMonitor monitor) throws CoreException {

-				internalSetCurrentSearch(search, monitor);

-			}

-		};

-		boolean isAutoBuilding= SearchPlugin.getWorkspace().isAutoBuilding();

-		if (isAutoBuilding)

-			// disable auto-build during search operation

-			SearchPlugin.setAutoBuilding(false);

-		try {

-			ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());

-			dialog.run(true, true, op);

-		} catch (InvocationTargetException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.switchSearch.title"), SearchMessages.getString("Search.Error.switchSearch.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		} catch (InterruptedException e) {

-			// Do nothing. Operation has been canceled.

-		} finally {

-			SearchPlugin.getWorkspace().addResourceChangeListener(this);

-			if (isAutoBuilding)

-				// enable auto-building again

-				SearchPlugin.setAutoBuilding(true);				

-		}

-	}

-

-	void internalSetCurrentSearch(final Search search, IProgressMonitor monitor) {

-		if (fCurrentSearch != null)

-			fCurrentSearch.backupMarkers();

-				

-		fCurrentSearch= search;

-		monitor.beginTask(SearchMessages.getString("SearchManager.updating"), getCurrentResults().size() + 20); //$NON-NLS-1$

-		

-		// remove current search markers

-		try {

-			SearchPlugin.getWorkspace().getRoot().deleteMarkers(SearchUI.SEARCH_MARKER, true, IResource.DEPTH_INFINITE);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-		monitor.worked(10);

-

-		// add search markers

-		Iterator iter= getCurrentResults().iterator();

-		ArrayList emptyEntries= new ArrayList(10);

-		boolean filesChanged= false;

-		boolean filesDeleted= false;

-		while (iter.hasNext()) {

-			monitor.worked(1);

-			SearchResultViewEntry entry= (SearchResultViewEntry)iter.next();

-			Iterator attrPerMarkerIter= entry.getAttributesPerMarker().iterator();

-			entry.clearMarkerList();

-			if (entry.getResource() == null || !entry.getResource().exists()) {

-				emptyEntries.add(entry);

-				filesDeleted= true;

-				continue;

-			}

-			if (!filesChanged && entry.getResource().getModificationStamp() != entry.getModificationStamp())

-				filesChanged= true;

-			while (attrPerMarkerIter.hasNext()) {

-				IMarker newMarker= null;

-				try {

-					newMarker= entry.getResource().createMarker(SearchUI.SEARCH_MARKER);

-				} catch (CoreException ex) {

-					ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createMarker.title"), SearchMessages.getString("Search.Error.createMarker.message")); //$NON-NLS-2$ //$NON-NLS-1$

-					continue;

-				}

-				try {

-					newMarker.setAttributes((Map)attrPerMarkerIter.next());

-				} catch (CoreException ex) {

-					ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.markerAttributeAccess.title"), SearchMessages.getString("Search.Error.markerAttributeAccess.message")); //$NON-NLS-2$ //$NON-NLS-1$

-				}

-				entry.add(newMarker);

-			}

-		}

-		getCurrentResults().removeAll(emptyEntries);

-		monitor.worked(10);

-		

-		String warningMessage= null;

-		Display display= getDisplay();

-		

-		if (filesChanged)

-			warningMessage= SearchMessages.getString("SearchManager.resourceChanged"); //$NON-NLS-1$

-		if (filesDeleted) {

-			if (warningMessage == null)

-				warningMessage= ""; //$NON-NLS-1$

-			else

-				warningMessage += "\n";			 //$NON-NLS-1$

-			warningMessage += SearchMessages.getString("SearchManager.resourceDeleted"); //$NON-NLS-1$

-		}

-		if (warningMessage != null) {

-			if (display != null && !display.isDisposed()) {

-				final String warningTitle= SearchMessages.getString("SearchManager.resourceChangedWarning"); //$NON-NLS-1$

-				final String warningMsg= warningMessage;

-				display.syncExec(new Runnable() {

-					public void run() {

-						MessageDialog.openWarning(getShell(), warningTitle, warningMsg);

-					}

-				});

-			}

-		}

-			

-		// update viewers

-		iter= fListeners.iterator();

-		if (display != null && !display.isDisposed()) {

-			while (iter.hasNext()) {

-				final SearchResultViewer viewer= (SearchResultViewer)iter.next();

-				viewer.setPageId(search.getPageId());

-				viewer.setGotoMarkerAction(search.getGotoMarkerAction());

-				viewer.setContextMenuTarget(search.getContextMenuContributor());

-				display.syncExec(new Runnable() {

-					public void run() {

-						viewer.internalSetLabelProvider(search.getLabelProvider());

-						viewer.setInput(getCurrentResults());

-					}

-				});

-			}

-		}

-		monitor.done();

-	}

-	/**

-	 * Returns the list with current (last) results

-	 */

-	int getCurrentItemCount() {

-		if (fCurrentSearch != null)

-			return fCurrentSearch.getItemCount();

-		else

-			return 0;

-	}

-

-	void addNewSearch(Search newSearch) {

-		if (fCurrentSearch != null) {

-			if (fCurrentSearch.isSameSearch(newSearch))

-				getPreviousSearches().remove(fCurrentSearch);

-			else

-				fCurrentSearch.backupMarkers();

-		}

-		fCurrentSearch= newSearch;

-		getPreviousSearches().addFirst(fCurrentSearch);

-		

-		// Remove the markers

-		try {

-			SearchPlugin.getWorkspace().getRoot().deleteMarkers(SearchUI.SEARCH_MARKER, true, IResource.DEPTH_INFINITE);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.deleteMarkers.title"), SearchMessages.getString("Search.Error.deleteMarkers.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-

-		// Clear the viewers

-		Iterator iter= fListeners.iterator();

-		Display display= getDisplay();

-		if (display != null && !display.isDisposed()) {

-			while (iter.hasNext()) {

-				final SearchResultViewer viewer= (SearchResultViewer)iter.next();

-				display.syncExec(new Runnable() {

-					public void run() {

-						viewer.handleRemoveAll();

-					}

-				});

-			}

-		}

-	}

-

-	void setCurrentResults(ArrayList results) {

-		Assert.isNotNull(results);

-		((Search)getCurrentSearch()).setResults(results);

-		if (results.isEmpty()) {

-			// directly update because there will be no delta

-				Display display= getDisplay();

-				if (display == null || display.isDisposed())

-					return;

-				display.syncExec(new Runnable() {

-					public void run() {

-						handleNewSearchResult();

-					}

-				});

-		}

-		else

-			fIsNewSearch= true;

-	}

-	

-	//--- Change event handling -------------------------------------------------

-

-	void addSearchChangeListener(SearchResultViewer viewer) {

-		fListeners.add(viewer);

-	}

-

-	void removeSearchChangeListener(SearchResultViewer viewer) {

-		fListeners.remove(viewer);

-	}

-	/**

-	 * Received a resource event. Since the delta could be created in a 

-	 * separate thread this methods post the event into the viewer's 

-	 * display thread.

-	 */

-	public final void handleResourceChanged(final IResourceChangeEvent event) {

-		IResourceDelta delta= event.getDelta();

-		if (delta == null)

-			return;

-

-		if (fIsNewSearch) {

-			fIsNewSearch= false;

-			handleNewSearchResult();

-			return;

-		}

-		

-		IResourceDeltaVisitor visitor= new IResourceDeltaVisitor() {

-			public boolean visit(IResourceDelta delta) throws CoreException {

-				if ( (delta.getFlags() & IResourceDelta.MARKERS) == 0)

-					return true;

-				IMarkerDelta[] markers= delta.getMarkerDeltas();

-				if (markers == null)

-					return true;

-				for (int i= 0; i < markers.length; i++) {

-					IMarkerDelta markerDelta= markers[i];

-					int kind= markerDelta.getKind();

-					IMarker marker= markerDelta.getMarker();

-					if (markerDelta.isSubtypeOf(SearchUI.SEARCH_MARKER)) {

-						if ((kind & IResourceDelta.ADDED) != 0)

-							handleAddMatch(marker);

-						else if (((kind & IResourceDelta.REMOVED) != 0))

-							handleRemoveMatch(marker);

-						else if ((kind & IResourceDelta.CHANGED) != 0)

-							handleUpdateMatch(marker);

-					}

-				}

-				return true;

-			}

-		};

-		try {

-			delta.accept(visitor);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.resourceChanged.title"), SearchMessages.getString("Search.Error.resourceChanged.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-	}

-

-	private void handleRemoveAll() {

-		if (fCurrentSearch != null)

-			((Search)fCurrentSearch).removeResults();

-		Iterator iter= fListeners.iterator();

-		while (iter.hasNext())

-			((SearchResultViewer)iter.next()).handleRemoveAll();

-	}

-

-	private void handleAddMatch(IMarker marker) {

-		Object groupByKey= getCurrentSearch().getGroupByKeyComputer().computeGroupByKey(marker);

-		SearchResultViewEntry entry= findEntry(groupByKey);

-		if (entry == null) {

-			entry= new SearchResultViewEntry(groupByKey, marker.getResource());

-			getCurrentResults().add(entry);

-			entry.add(marker);

-			Iterator iter= fListeners.iterator();

-			while (iter.hasNext())

-				((SearchResultViewer)iter.next()).handleAddMatch(entry);

-		}

-		else {

-			entry.add(marker);

-			Iterator iter= fListeners.iterator();

-			while (iter.hasNext())

-				((SearchResultViewer)iter.next()).handleUpdateMatch(entry);

-		}

-	}

-	

-	private void handleNewSearchResult() {

-		Iterator iter= fListeners.iterator();

-		final Search search= getCurrentSearch();

-		while (iter.hasNext()) {

-			SearchResultViewer viewer= (SearchResultViewer)iter.next();

-			viewer.setPageId(search.getPageId());

-			viewer.setContextMenuTarget(search.getContextMenuContributor());

-			viewer.internalSetLabelProvider(search.getLabelProvider());

-			viewer.setGotoMarkerAction(search.getGotoMarkerAction());

-			viewer.setInput(getCurrentResults());

-		}

-	}

-	

-	private void handleRemoveMatch(IMarker marker) {

-		SearchResultViewEntry entry= findEntry(marker);

-		if (entry != null) {

-			entry.remove(marker);

-			if (entry.getMatchCount() == 0) {

-				getCurrentResults().remove(entry);

-				Iterator iter= fListeners.iterator();

-				while (iter.hasNext())

-					((SearchResultViewer)iter.next()).handleRemoveMatch(entry);

-			}

-			else {

-				Iterator iter= fListeners.iterator();

-				while (iter.hasNext())

-					((SearchResultViewer)iter.next()).handleUpdateMatch(entry);

-			}

-		}

-	}

-

-	private void handleUpdateMatch(IMarker marker) {

-		SearchResultViewEntry entry= findEntry(marker);

-		if (entry != null) {

-			Iterator iter= fListeners.iterator();

-			while (iter.hasNext())

-				((SearchResultViewer)iter.next()).handleUpdateMatch(entry);

-		}

-	}

-

-	private SearchResultViewEntry findEntry(IMarker marker) {

-		Iterator entries= getCurrentResults().iterator();

-		while (entries.hasNext()) {

-			SearchResultViewEntry entry= (SearchResultViewEntry)entries.next();

-			if (entry.contains(marker))

-				return entry;

-		}

-		return null;

-	}

-

-	private SearchResultViewEntry findEntry(Object key) {

-		if (key == null)

-			return null;

-		Iterator entries= getCurrentResults().iterator();

-		while (entries.hasNext()) {

-			SearchResultViewEntry entry= (SearchResultViewEntry)entries.next();

-			if (key.equals(entry.getGroupByKey()))

-				return entry;

-		}

-		return null;

-	}

-	/**

-	 * Received a resource event. Since the delta could be created in a 

-	 * separate thread this methods post the event into the viewer's 

-	 * display thread.

-	 */

-	public final void resourceChanged(final IResourceChangeEvent event) {

-		Display display= getDisplay();

-		if (display == null || display.isDisposed())

-			return;

-		Runnable runnable= new Runnable() {

-			public void run() {

-				handleResourceChanged(event);

-				// update title and actions

-				Iterator iter= fListeners.iterator();

-				while (iter.hasNext()) {

-					SearchResultViewer viewer= (SearchResultViewer)iter.next();

-					viewer.enableActions();

-					viewer.updateTitle();

-				}

-			}

-		};

-		display.syncExec(runnable);	

-	}

-	/**

-	 * Find and return a valid display

-	 */

-	private Display getDisplay() {

-		Iterator iter= fListeners.iterator();

-		while (iter.hasNext()) {

-			Control control= ((Viewer)iter.next()).getControl();

-			if (control != null && !control.isDisposed()) {

-				Display display= control.getDisplay();

-				if (display != null && !display.isDisposed())

-					return display;

-			}

-		}

-		return null;

-	}

-	/**

-	 * Find and return a valid shell

-	 */

-	private Shell getShell() {

-		return SearchPlugin.getActiveWorkbenchShell();

-	}

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
deleted file mode 100644
index 94a43bf..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.text.MessageFormat;

-import java.util.MissingResourceException;

-import java.util.ResourceBundle;

-

-public class SearchMessages {

-

-	private static final String RESOURCE_BUNDLE= "org.eclipse.search.internal.ui.SearchMessages";//$NON-NLS-1$

-

-	private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);

-

-	private SearchMessages() {

-	}

-

-	public static String getString(String key) {

-		try {

-			return fgResourceBundle.getString(key);

-		} catch (MissingResourceException e) {

-			return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$

-		}

-	}

-	/**

-	 * Gets a string from the resource bundle and formats it with the argument

-	 * 

-	 * @param key	the string used to get the bundle value, must not be null

-	 */

-	public static String getFormattedString(String key, Object arg) {

-		String format= null;

-		try {

-			format= fgResourceBundle.getString(key);

-		} catch (MissingResourceException e) {

-			return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$

-		}

-		if (arg == null)

-			arg= ""; //$NON-NLS-1$

-		return MessageFormat.format(format, new Object[] { arg });

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
deleted file mode 100644
index 57080a0..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
+++ /dev/null
@@ -1,117 +0,0 @@
-#########################################

-# (c) Copyright IBM Corp. 2000, 2001.

-# All Rights Reserved.

-#########################################

-

-SearchDialog.title=Search

-SearchDialog.performAction=&Search

-SearchDialog.noSearchExtension=No Search Extensions plugged into workbench

-

-SearchManager.resourceChangedWarning=Changed Resources

-SearchManager.resourceChanged=Some of the resources have changed. Matches might be at wrong positions.

-SearchManager.resourceDeleted=Some of the resources no longer exist. Corresponding matches are removed from the search results.

-SearchManager.updating=Updating...

-

-SearchResultView.title=Search

-SearchResultView.matches=matches

-SearchResultView.removed_resource=<removed resource>

-SearchResultView.removeAllResults.text=Remove &All

-SearchResultView.removeAllResults.tooltip=Remove All Search Results

-SearchResultView.removeAllSearches.text=Remove &All

-SearchResultView.removeAllSearches.tooltip=Remove All Searches

-SearchResultView.searchAgain.text=&Search Again

-SearchResultView.searchAgain.tooltip=Search Again

-SearchResultView.previousSearches.text=Previous Search Results

-SearchResultView.previousSearches.tooltip=Previous Search Results

-SearchResultView.removeEntry.text=&Remove Entry

-SearchResultView.removeEntry.tooltip=Remove Entry

-SearchResultView.removeEntries.text=&Remove Entries

-SearchResultView.removeEntries.tooltip=Remove Entries

-SearchResultView.removeMatch.text=Remove &Match

-SearchResultView.removeMatch.tooltip=Remove Match

-SearchResultView.gotoMarker.text=&Go to File

-SearchResultView.gotoMarker.tooltip=Go to File

-SearchResultView.showNext.text=Next

-SearchResultView.showNext.tooltip=Show Next Match

-SearchResultView.showPrev.text=Previous

-SearchResultView.showPrev.tooltip=Show Previous Match

-

-SearchDialogClosingDialog.title=Search Dialog Closing

-SearchDialogClosingDialog.message=Dialog can not be closed due to an active operation. You must cancel the operation before you can close the dialog.

-

-Search.Error.search.title=Search Error

-Search.Error.search.message=An error occurred during the search operation

-

-Search.Error.setDescription.title=Search Error

-Search.Error.setDescription.message=Can not save workspace description

-

-Search.Error.openEditor.title=Search Error

-Search.Error.openEditor.message=Could not open the editor

-

-Search.Error.openResultView.title=Search Error

-Search.Error.openResultView.message=Could not open the search results view

-

-Search.Error.deleteMarkers.title=Search Error

-Search.Error.deleteMarkers.message=An error occurred during deletion of search markers

-

-Search.Error.resourceChanged.title=Search Error

-Search.Error.resourceChanged.message=An error occurred during handling of resource changes

-

-Search.Error.createMarker.title=Search Error

-Search.Error.createMarker.message=Could not create the search marker

-

-Search.Error.markerAttributeAccess.title=Search Error

-Search.Error.markerAttributeAccess.message=An error occurred while accessing a marker attribute

-

-Search.Error.switchSearch.title=Search Error

-Search.Error.switchSearch.message=An error occurred while switching to a previous search result

-

-Search.Error.createSearchPage.title=Search Error

-Search.Error.createSearchPage.message=An error occurred while creating a search page

-

-Search.Error.createSorter.title=Search Error

-Search.Error.createSorter.message=An error occurred while creating a sorter

-

-Search.Error.incorrectIconLocation.title=Search Error

-Search.Error.incorrectIconLocation.message=Invalid icon location

-

-SearchResultCollector.matches=matches

-SearchResultCollector.done=Search done

-

-SearchPage.expression.label=Se&arch Expression

-SearchPage.expression.pattern=(* = any string, ? = any character, \\ = escape for literals: * ? \\)

-SearchPage.browse=&Browse...

-SearchPage.extensions=&Extensions

-SearchPage.caseSensitive=&Case sensitive

-

-TextSearchEngine.scanning=Scanning...

-

-TextSearchVisitor.error=Error reading file during search: {0}

-TextSearchVisitor.canceled=Operation Canceled

-

-SortDropDownAction.label=S&ort

-SortDropDownAction.tooltip=Sort

-

-ShowOtherSearchesAction.label=&Other...

-ShowOtherSearchesAction.tooltip=Open Other Searches Dialog

-

-OtherSearchesDialog.title=Other Searches

-OtherSearchesDialog.message=&Select one of the searches

-

-PreviousSearchesDialog.title=Previous Searches

-PreviousSearchesDialog.message=&Select one of the searches

-

-TextSearchOperation.descriptionPostfix=\ - {0} Occurrences

-

-TypedResourceVisitor.unknownResourceType=Unknown resource type

-

-OpenSearchDialogAction.label = Search

-OpenSearchDialogAction.tooltip = Search

-

-FileTypeEditor.typeDelimiter = ,

-

-TypesFiltering.title = Select Types

-TypesFiltering.message = S&elect the types to scan.

-TypesFiltering.otherExtensions = &Other Extensions:

-TypesFiltering.selectAll = &Select All

-TypesFiltering.deselectAll = &Deselect All

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
deleted file mode 100644
index 1f4d34c..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.net.MalformedURLException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.List;

-import java.util.StringTokenizer;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Point;

-

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.resource.StringConverter;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IAdaptable;

-import org.eclipse.core.runtime.IConfigurationElement;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.ISearchPage;

-import org.eclipse.search.ui.ISearchPageScoreComputer;

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-/**

- * Proxy that represents a search page.

- */

-class SearchPageDescriptor implements Comparable {

-

-	public final static String PAGE_TAG= "page"; //$NON-NLS-1$

-	private final static String ID_ATTRIBUTE= "id"; //$NON-NLS-1$

-	private final static String ICON_ATTRIBUTE= "icon"; //$NON-NLS-1$

-	private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$

-	private final static String LABEL_ATTRIBUTE= "label"; //$NON-NLS-1$

-	private final static String SIZE_ATTRIBUTE= "sizeHint"; //$NON-NLS-1$

-	private final static String TAB_POSITION_ATTRIBUTE= "tabPosition"; //$NON-NLS-1$

-	private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$

-	

-	public final static Point UNKNOWN_SIZE= new Point(SWT.DEFAULT, SWT.DEFAULT);

-	

-	private IConfigurationElement fElement;

-	

-	private static class ExtensionScorePair {

-		public String extension;

-		public int score;

-		public ExtensionScorePair(String extension, int score) {

-			this.extension= extension;

-			this.score= score;

-		}

-	}

-	private List fExtensionScorePairs;

-	private int fWildcardScore= ISearchPageScoreComputer.UNKNOWN;

-	

-

-	

-	/**

-	 * Creates a new search page node with the given configuration element.

-	 */

-	public SearchPageDescriptor(IConfigurationElement element) {

-		fElement= element;

-	}

-

-	/**

-	 * Creates a new search page from this node.

-	 */

-	public ISearchPage createObject() {

-		ISearchPage result= null;

-		try {

-			result= (ISearchPage)fElement.createExecutableExtension(CLASS_ATTRIBUTE);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSearchPage.title"), SearchMessages.getString("Search.Error.createSearchPage.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		} catch (ClassCastException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSearchPage.title"), SearchMessages.getString("Search.Error.createSearchPage.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		}

-		if (result != null) {

-			result.setTitle(getLabel());

-		}

-		return result;

-	}

-	

-	//---- XML Attribute accessors ---------------------------------------------

-	

-	/**

-	 * Returns the page's id.

-	 */

-	public String getId() {

-		return fElement.getAttribute(ID_ATTRIBUTE);

-	}

-	 

-	/**

-	 * Returns the page's image

-	 */

-	public ImageDescriptor getImage() {

-		String imageName= fElement.getAttribute(ICON_ATTRIBUTE);

-		if (imageName == null)

-			return null;

-		URL url;

-		try {

-			url= new URL(fElement.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL(), imageName);

-		} catch (java.net.MalformedURLException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSearchPage.title"), SearchMessages.getString("Search.Error.createSearchPage.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		}

-		return ImageDescriptor.createFromURL(url);

-	}

-

-	/**

-	 * Returns the page's label.

-	 */

-	public String getLabel() {

-		return fElement.getAttribute(LABEL_ATTRIBUTE);

-	}

-	

-	/**

-	 * Returns the page's preferred size

-	 */

-	public Point getPreferredSize() {

-		return StringConverter.asPoint(

-			fElement.getAttribute(SIZE_ATTRIBUTE), UNKNOWN_SIZE);

-	}

-	/**

-	 * Returns the page's tab position relative to the other tabs.

-	 * @return	the tab position or <code>Integer.MAX_VALUE</code> if not defined in

-	 			the plugins.xml file

-	 *

-	 */

-	public int getTabPosition() {

-		int position= Integer.MAX_VALUE / 2;

-		String str= fElement.getAttribute(TAB_POSITION_ATTRIBUTE);

-		if (str != null)

-			try {

-				position= Integer.parseInt(str);

-		} catch (NumberFormatException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSearchPage.title"), SearchMessages.getString("Search.Error.createSearchPage.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			// position is Integer.MAX_VALUE;

-		}

-		return position;

-	}

-

-	/* 

-	 * Implements a method from IComparable 

-	 */ 

-	public int compareTo(Object o) {

-		int myPos= getTabPosition();

-		int objsPos= ((SearchPageDescriptor)o).getTabPosition();

-		if (myPos == Integer.MAX_VALUE && objsPos == Integer.MAX_VALUE || myPos == objsPos)

-			return getLabel().compareTo(((SearchPageDescriptor)o).getLabel());

-		else

-			return myPos - objsPos;

-	}

-	

-	//---- Suitability tests ---------------------------------------------------

-	

-	/**

-	 * Returns the score for this page with the given input element.

-	 */

-	public int computeScore(Object element) {

-		if (element instanceof IFile) {

-			String extension= ((IFile)element).getFileExtension();

-			if (extension != null)

-				return getScoreForFileExtension(extension);

-		} else if (element instanceof IAdaptable) {

-			ISearchPageScoreComputer tester= 

-				(ISearchPageScoreComputer)((IAdaptable)element).getAdapter(ISearchPageScoreComputer.class);

-			if (tester != null)

-				return tester.computeScore(getId(), element);	

-		} else if (element instanceof ISearchResultViewEntry) {

-			ISearchResultViewEntry entry= (ISearchResultViewEntry)element;

-			return computeScore(entry.getSelectedMarker());

-		}

-		if (fWildcardScore != ISearchPageScoreComputer.UNKNOWN)

-			return fWildcardScore;

-			

-		return ISearchPageScoreComputer.LOWEST;

-	}

-	

-	private int getScoreForFileExtension(String extension) {

-		if (fExtensionScorePairs == null)

-			readExtensionScorePairs();

-			

-		int size= fExtensionScorePairs.size();

-		for (int i= 0; i < size; i++) {

-			ExtensionScorePair p= (ExtensionScorePair)fExtensionScorePairs.get(i);

-			if (extension.equals(p.extension))

-				return p.score;

-		}

-		if (fWildcardScore != ISearchPageScoreComputer.UNKNOWN)

-			return fWildcardScore;

-			

-		return ISearchPageScoreComputer.LOWEST;	

-	}

-	

-	private void readExtensionScorePairs() {

-		fExtensionScorePairs= new ArrayList(3);

-		String content= fElement.getAttribute(EXTENSIONS_ATTRIBUTE);

-		StringTokenizer tokenizer= new StringTokenizer(content, ","); //$NON-NLS-1$

-		while (tokenizer.hasMoreElements()) {

-			String token= tokenizer.nextToken().trim();

-			int pos= token.indexOf(':');

-			if (pos != -1) {

-				String extension= token.substring(0, pos);

-				int score= StringConverter.asInt(token.substring(pos+1), ISearchPageScoreComputer.UNKNOWN);

-				if (extension.equals("*")) { //$NON-NLS-1$

-					fWildcardScore= score;

-				} else {

-					fExtensionScorePairs.add(new ExtensionScorePair(extension, score));

-				}	

-			}

-		}

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
deleted file mode 100644
index 2eba091..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.List;

-

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-

-import org.eclipse.jface.util.Assert;

-

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.IWorkspaceDescription;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-import org.eclipse.core.runtime.IPluginDescriptor;

-import org.eclipse.core.runtime.IPluginRegistry;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.ui.IViewPart;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-import org.eclipse.search.ui.ISearchResultView;

-import org.eclipse.search.ui.SearchUI;

-

-/**

- * The plug-in runtime class for Search plug-in

- */

-public class SearchPlugin extends AbstractUIPlugin {

-	

-	public static final String SEARCH_PAGE_EXTENSION_POINT= "searchPages"; //$NON-NLS-1$

-	public static final String SORTER_EXTENSION_POINT= "searchResultSorters"; //$NON-NLS-1$

-	

-	private static SearchPlugin fgSearchPlugin;

-		

-	private List fPageDescriptors;

-	private List fSorterDescriptors;

-

-	public SearchPlugin(IPluginDescriptor descriptor) {

-		super(descriptor);

-		Assert.isTrue(fgSearchPlugin == null);

-		fgSearchPlugin= this;

-	}

-	/**

-	 * Returns the search plugin instance.

-	 */

-	public static SearchPlugin getDefault() {

-		return fgSearchPlugin;

-	}

-	/**

-	 * Returns the active workbench window.

-	 * <code>null</code> if the active window is not a workbench window

-	 */

-	public static IWorkbenchWindow getActiveWorkbenchWindow() {

-		IWorkbenchWindow window= fgSearchPlugin.getWorkbench().getActiveWorkbenchWindow();

-		if (window == null) {

-			final WindowRef windowRef= new WindowRef();

-			Display.getDefault().syncExec(new Runnable() {

-				public void run() {

-					setActiveWorkbenchWindow(windowRef);

-				}

-			});

-			return windowRef.window;

-		}

-		else

-			return window;

-	}

-

-	private static class WindowRef {

-		public IWorkbenchWindow window;

-	}

-

-	private static void setActiveWorkbenchWindow(WindowRef windowRef) {

-		windowRef.window= null;

-		Display display= Display.getCurrent();

-		if (display == null)

-			return;

-		Control shell= display.getActiveShell();

-		while (shell != null) {

-			Object data= shell.getData();

-			if (data instanceof IWorkbenchWindow) {

-				windowRef.window= (IWorkbenchWindow)data;

-				return;

-			}

-			shell= shell.getParent();

-		}

-		Shell shells[]= display.getShells();

-		for (int i= 0; i < shells.length; i++) {

-			Object data= shells[i].getData();

-			if (data instanceof IWorkbenchWindow) {

-				windowRef.window= (IWorkbenchWindow)data;

-				return;

-			}

-		}

-	}

-	/**

-	 * Returns the shell of the active workbench window.

-	 */

-	public static Shell getActiveWorkbenchShell() {

-		IWorkbenchWindow window= getActiveWorkbenchWindow();

-		if (window != null)

-			return window.getShell();

-		return null;

-	}

-	/**

-	 * Beeps using the display of the active workbench window.

-	 */

-	public static void beep() {

-		getActiveWorkbenchShell().getDisplay().beep();

-	}

-	/**

-	 * Returns the active workbench window's currrent page.

-	 */

-	public static IWorkbenchPage getActivePage() {

-		return getActiveWorkbenchWindow().getActivePage();

-	} 

-	/**

-	 * Returns the workbench from which this plugin has been loaded.

-	 */	

-	public static IWorkspace getWorkspace() {

-		return ResourcesPlugin.getWorkspace();

-	}

-	/**

-	 * Activates the search result view in the active page.

-	 * This call has no effect, if the search result view is

-	 * already activated.

-	 *

-	 * @return <code>true</code> if the search result view could be activated

-	 */

-	public static boolean activateSearchResultView() {

-		try {

-			return (getActivePage().showView(SearchUI.SEARCH_RESULT_VIEW_ID) != null);

-		} catch (PartInitException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openResultView.title"), SearchMessages.getString("Search.Error.openResultView.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return false;

-		}	

-	}

-	/**

-	 * Returns the search result view of the active workbench window. Returns <code>

-	 * null</code> if the active workbench window doesn't have any search result

-	 * view.

-	 */

-	public static ISearchResultView getSearchResultView() {

-		IViewPart part= getActivePage().findView(SearchUI.SEARCH_RESULT_VIEW_ID);

-		if (part instanceof ISearchResultView)

-			return (ISearchResultView) part;

-		return null;	

-	}

-

-	static void setAutoBuilding(boolean state) {

-		IWorkspaceDescription workspaceDesc= getDefault().getWorkspace().getDescription();

-		workspaceDesc.setAutoBuilding(state);

-		try {

-			getDefault().getWorkspace().setDescription(workspaceDesc);

-		}

-		catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.setDescription.title"), SearchMessages.getString("Search.Error.setDescription.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-	}

-	/**

-	 * Shuts down this plug-in.

-	 */

-	public void shutdown() throws CoreException {

-		super.shutdown();

-		getWorkspace().removeResourceChangeListener(SearchManager.getDefault());

-		fgSearchPlugin = null;

-	}

-	/**

-	 * Returns all search pages contributed to the workbench.

-	 */

-	public List getSearchPageDescriptors() {

-		if (fPageDescriptors == null) {

-			IPluginRegistry registry= Platform.getPluginRegistry();

-			IConfigurationElement[] elements= registry.getConfigurationElementsFor(SearchUI.PLUGIN_ID, SEARCH_PAGE_EXTENSION_POINT);

-			fPageDescriptors= createSearchPageDescriptors(elements);

-		}	

-		return fPageDescriptors;

-	} 

-

-	/**

-	 * Creates all necessary search page nodes.

-	 */

-	private List createSearchPageDescriptors(IConfigurationElement[] elements) {

-		List result= new ArrayList(5);

-		for (int i= 0; i < elements.length; i++) {

-			IConfigurationElement element= elements[i];

-			if (SearchPageDescriptor.PAGE_TAG.equals(element.getName())) {

-				SearchPageDescriptor desc= new SearchPageDescriptor(element);

-				result.add(desc);

-			}

-		}

-		Collections.sort(result);

-		return result;

-	}

-	/**

-	 * Returns all sorters contributed to the workbench.

-	 */

-	public List getSorterDescriptors() {

-		if (fSorterDescriptors == null) {

-			IPluginRegistry registry= Platform.getPluginRegistry();

-			IConfigurationElement[] elements= registry.getConfigurationElementsFor(SearchUI.PLUGIN_ID, SORTER_EXTENSION_POINT);

-			fSorterDescriptors= createSorterDescriptors(elements);

-		}	

-		return fSorterDescriptors;

-	} 

-	/**

-	 * Creates all necessary sorter description nodes.

-	 */

-	private List createSorterDescriptors(IConfigurationElement[] elements) {

-		List result= new ArrayList(5);

-		for (int i= 0; i < elements.length; i++) {

-			IConfigurationElement element= elements[i];

-			if (SorterDescriptor.SORTER_TAG.equals(element.getName()))

-				result.add(new SorterDescriptor(element));

-		}

-		return result;

-	}

-	/**

-	 * Log status to platform log

-	 */	

-	public static void log(IStatus status) {

-		getDefault().getLog().log(status);

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPluginImages.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPluginImages.java
deleted file mode 100644
index 5951348..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPluginImages.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.net.MalformedURLException;

-import java.net.URL;

-

-import org.eclipse.swt.graphics.Image;

-

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.resource.ImageRegistry;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-

-/**

- * Bundle of all images used by the Search UI plugin.

- */

-public class SearchPluginImages {

-

-	private static URL fgIconLocation;

-

-	static {

-		String pathSuffix= ""; //$NON-NLS-1$

-		Display display= Display.getCurrent();

-		if (display == null)

-			// class might get loaded by non-UI thread.

-			display= Display.getDefault();

-		if (display != null && display.getIconDepth() > 4)

-			pathSuffix = "icons/full/"; //$NON-NLS-1$

-		else

-			pathSuffix = "icons/basic/"; //$NON-NLS-1$

-		try {

-			fgIconLocation= new URL(SearchPlugin.getDefault().getDescriptor().getInstallURL(), pathSuffix);

-		} catch (MalformedURLException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.incorrectIconLocation.title"), SearchMessages.getString("Search.Error.incorrectIconLocation.message")); //$NON-NLS-2$ //$NON-NLS-1$

-		}

-	}

-

-	// The plugin registry

-	private final static ImageRegistry PLUGIN_REGISTRY= SearchPlugin.getDefault().getImageRegistry();

-

-	public static final String T_OBJ= "obj16/"; //$NON-NLS-1$

-	public static final String T_WIZBAN= "wizban/"; //$NON-NLS-1$

-	public static final String T_LCL= "lcl16/"; //$NON-NLS-1$

-	public static final String T_TOOL= "tool16/"; //$NON-NLS-1$

-	public static final String T_VIEW= "view16/"; //$NON-NLS-1$

-

-	private static final String NAME_PREFIX= "org.eclipse.search.ui."; //$NON-NLS-1$

-	private static final int    NAME_PREFIX_LENGTH= NAME_PREFIX.length();

-

-	// Define image names

-	public static final String IMG_TOOL_SEARCH= NAME_PREFIX + "search.gif"; //$NON-NLS-1$

-

-	public static final String IMG_LCL_SEARCH_STOP= NAME_PREFIX + "search_stop.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_REM= NAME_PREFIX + "search_rem.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_REM_ALL= NAME_PREFIX + "search_remall.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_NEXT= NAME_PREFIX + "search_next.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_PREV= NAME_PREFIX + "search_prev.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_GOTO= NAME_PREFIX + "search_goto.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_SORT= NAME_PREFIX + "search_sortmatch.gif"; //$NON-NLS-1$

-	public static final String IMG_LCL_SEARCH_HISTORY= NAME_PREFIX + "search_history.gif"; //$NON-NLS-1$

-

-	public static final String IMG_VIEW_SEARCHRES= NAME_PREFIX + "searchres.gif"; //$NON-NLS-1$

-

-	public static final String IMG_OBJ_TSEARCH= NAME_PREFIX + "tsearch_obj.gif"; //$NON-NLS-1$

-	public static final String IMG_OBJ_TSEARCH_DPDN= NAME_PREFIX + "tsearch_dpdn_obj.gif"; //$NON-NLS-1$

-	public static final String IMG_OBJ_SEARCHMARKER= NAME_PREFIX + "searchm_obj.gif"; //$NON-NLS-1$

-

-	

-	

-	// Define images

-	public static final ImageDescriptor DESC_OBJ_TSEARCH= createManaged(T_OBJ, IMG_OBJ_TSEARCH);

-	public static final ImageDescriptor DESC_OBJ_TSEARCH_DPDN= createManaged(T_OBJ, IMG_OBJ_TSEARCH_DPDN);

-	public static final ImageDescriptor DESC_OBJ_SEARCHMARKER= createManaged(T_OBJ, IMG_OBJ_SEARCHMARKER);

-

-	public static Image get(String key) {

-		return PLUGIN_REGISTRY.get(key);

-	}

-	

-	private static ImageDescriptor createManaged(String prefix, String name) {

-			ImageDescriptor result= ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH)));

-			PLUGIN_REGISTRY.put(name, result);

-			return result;

-	}

-	

-	private static ImageDescriptor create(String prefix, String name) {

-		return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));

-	}

-	

-	private static URL makeIconFileURL(String prefix, String name) {

-		StringBuffer buffer= new StringBuffer(prefix);

-		buffer.append(name);

-		try {

-			return new URL(fgIconLocation, buffer.toString());

-		} catch (MalformedURLException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.incorrectIconLocation.title"), SearchMessages.getString("Search.Error.incorrectIconLocation.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		}

-	}

-

-	/**

-	 * Sets all available image descriptors for the given action.

-	 */	

-	public static void setImageDescriptors(IAction action, String type, String relPath) {

-		relPath= relPath.substring(NAME_PREFIX_LENGTH);

-		action.setDisabledImageDescriptor(create("d" + type, relPath)); //$NON-NLS-1$

-		action.setHoverImageDescriptor(create("c" + type, relPath)); //$NON-NLS-1$

-		action.setImageDescriptor(create("e" + type, relPath)); //$NON-NLS-1$

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultContentProvider.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultContentProvider.java
deleted file mode 100644
index 2df3c2b..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultContentProvider.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.ArrayList;

-

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-class SearchResultContentProvider implements IStructuredContentProvider {

-	

-	private static final Object[] fgEmptyArray= new Object[0];

-	

-	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-		// Do nothing since the viewer listens to resource deltas

-	}

-	

-	public void dispose() {

-	}

-	

-	public boolean isDeleted(Object element) {

-		return false;

-	}

-	

-	public Object[] getElements(Object element) {

-		if (element instanceof ArrayList)

-			return ((ArrayList)element).toArray();

-		else

-			return fgEmptyArray;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultLabelProvider.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultLabelProvider.java
deleted file mode 100644
index 7182f60..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultLabelProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.swt.graphics.Image;

-

-import org.eclipse.ui.model.WorkbenchLabelProvider;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-

-import org.eclipse.core.resources.IResource;

-

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-class SearchResultLabelProvider extends LabelProvider implements ILabelProvider {

-	

-	private static class FileLabelProvider extends LabelProvider {

-

-		private WorkbenchLabelProvider fWorkbenchLabelProvider= new WorkbenchLabelProvider();

-		

-		public String getText(Object element) {

-			if (!(element instanceof ISearchResultViewEntry))

-				return ""; //$NON-NLS-1$

-			IResource resource= ((ISearchResultViewEntry) element).getResource();

-			// PR 1G47GDO

-			if (resource == null)

-				return SearchMessages.getString("SearchResultView.removed_resource"); //$NON-NLS-1$

-			return fWorkbenchLabelProvider.getText(resource);

-		}

-

-		public Image getImage(Object element) {

-			if (!(element instanceof ISearchResultViewEntry))

-				return null; //$NON-NLS-1$

-			return fWorkbenchLabelProvider.getImage(((ISearchResultViewEntry) element).getResource());

-		}

-	}

-

-	private static final FileLabelProvider DEFAULT_LABEL_PROVIDER= new FileLabelProvider();

-	private static final String MATCHES_POSTFIX= " " + SearchMessages.getString("SearchResultView.matches") + ")"; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

-	private static ILabelProvider fgLabelProvider= DEFAULT_LABEL_PROVIDER;

-	

-	public ILabelProvider getLabelProvider() {

-		return fgLabelProvider;

-	}

-	

-	public void setLabelProvider(ILabelProvider provider) {

-		if (provider == null)

-			provider= DEFAULT_LABEL_PROVIDER;

-		fgLabelProvider= provider;

-	}

-	

-	public String getText(Object rowElement) {

-		StringBuffer text= new StringBuffer(fgLabelProvider.getText(rowElement));

-		int count= ((ISearchResultViewEntry)rowElement).getMatchCount();

-		if (count > 1) {

-			text.append(" ("); //$NON-NLS-1$

-			text.append(count);

-			text.append(MATCHES_POSTFIX);

-		}

-		return text.toString();			

-	}

-	

-	public Image getImage(Object rowElement) {

-		return fgLabelProvider.getImage(rowElement);	

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
deleted file mode 100644
index 7a36de1..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.Map;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspace;

-

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Display;

-

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.action.IToolBarManager;

-import org.eclipse.jface.operation.IRunnableWithProgress;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.util.Assert;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.ISelection;

-

-import org.eclipse.ui.help.ViewContextComputer;

-import org.eclipse.ui.help.WorkbenchHelp;

-import org.eclipse.ui.part.ViewPart;

-

-import org.eclipse.search.ui.IContextMenuContributor;

-import org.eclipse.search.ui.IGroupByKeyComputer;

-import org.eclipse.search.ui.ISearchResultView;

-

-public class SearchResultView extends ViewPart implements ISearchResultView {

-	private SearchResultViewer fViewer;

-	private Map fResponse;

-	

-	/**

-	 * Creates the search list inner viewer.

-	 */

-	public void createPartControl(Composite parent) {

-		Assert.isTrue(fViewer == null);

-		fViewer= new SearchResultViewer(this, parent);

-		IWorkspace workspace= SearchPlugin.getWorkspace();

-		SearchManager.getDefault().addSearchChangeListener(fViewer);

-		Search search= SearchManager.getDefault().getCurrentSearch();

-		if (search != null)

-			fViewer.setPageId(search.getPageId());

-		fViewer.setInput(SearchManager.getDefault().getCurrentResults());

-		fillToolBar(getViewSite().getActionBars().getToolBarManager());	

-		getSite().setSelectionProvider(fViewer);

-		

-		WorkbenchHelp.setHelp(fViewer.getControl(), new ViewContextComputer(this, ISearchHelpContextIds.SEARCH_VIEW));

-	}

-	

-	/**

-	 * Returns the search result viewer.

-	 */

-	SearchResultViewer getViewer() {

-		return fViewer;

-	}

-	

-	//---- IWorkbenchPart ------------------------------------------------------

-

-	public void setFocus() {

-		fViewer.getControl().setFocus();

-	}

-	

-	public void dispose() {

-		SearchManager.getDefault().removeSearchChangeListener(fViewer);

-		fViewer= null;

-		super.dispose();

-	}

-	

-	protected void setTitle(String title) {

-		super.setTitle(title);

-	}

-	

-	protected void setTitleToolTip(String text) {

-		super.setTitleToolTip(text);

-	}

-	

-	//---- Adding Action to Toolbar -------------------------------------------

-	

-	private void fillToolBar(IToolBarManager tbm) {

-		fViewer.fillToolBar(tbm);

-	}	

-	

-	private void setLabelProvider(final ILabelProvider provider) {

-		// Make sure we are doing it in the right thread.

-		getDisplay().syncExec(new Runnable() {

-			public void run() {

-				fViewer.internalSetLabelProvider(provider);

-			}

-		});

-	}

-	

-	private void setContextMenuContributor(final IContextMenuContributor contributor) {

-		// Make sure we are doing it in the right thread.

-		getDisplay().syncExec(new Runnable() {

-			public void run() {

-				fViewer.setContextMenuTarget(contributor);

-			}

-		});

-	}

-

-	private void setGotoMarkerAction(final IAction gotoMarkerAction) {

-		// Make sure we are doing it in the right thread.

-		getDisplay().syncExec(new Runnable() {

-			public void run() {

-				fViewer.setGotoMarkerAction(gotoMarkerAction);

-			}

-		});

-	}

-

-	Display getDisplay() {

-		return fViewer.getControl().getDisplay();

-	}	

-

-	//---- ISearchResultView --------------------------------------------------

-

-	/*

-	 * Implements method from ISearchResultView

-	 */

-	public ISelection getSelection() {

-		return fViewer.getSelection();

-	}

-

-	/*

-	 * Implements method from ISearchResultView

-	 */

-	public void searchStarted(

-				String			pageId,

-				String			label,

-				ImageDescriptor		imageDescriptor,

-				IContextMenuContributor contributor,

-				ILabelProvider		labelProvider,

-				IAction			gotoAction,

-				IGroupByKeyComputer	groupByKeyComputer,

-				IRunnableWithProgress	operation) {

-

-		Assert.isNotNull(pageId);

-		Assert.isNotNull(label);

-		Assert.isNotNull(gotoAction);		

-

-		fResponse= new HashMap(500);

-		setGotoMarkerAction(gotoAction);

-

-		SearchManager.getDefault().addNewSearch(		

-			new Search(

-				pageId,

-				label,

-				labelProvider,

-				imageDescriptor,

-				fViewer.getGotoMarkerAction(),

-				contributor,

-				groupByKeyComputer,

-				operation));

-	};

-

-	/*

-	 * Implements method from ISearchResultView

-	 */

-	public void addMatch(String description, Object groupByKey, IResource resource, IMarker marker) {

-		SearchResultViewEntry entry= (SearchResultViewEntry)fResponse.get(groupByKey);

-		if (entry == null) {

-			entry= new SearchResultViewEntry(groupByKey, resource);

-			fResponse.put(groupByKey, entry);

-		}

-		entry.add(marker);

-	}

-

-	/*

-	 * Implements method from ISearchResultView

-	 */

-	public void searchFinished() {

-		SearchManager.getDefault().setCurrentResults(new ArrayList(fResponse.values()));

-	}	

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewEntry.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewEntry.java
deleted file mode 100644
index d619e73..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewEntry.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-

-import org.eclipse.search.ui.ISearchResultViewEntry;

-

-/**

- * Represents an entry in the search result view

- */

-class SearchResultViewEntry implements ISearchResultViewEntry {

-

-	private Object fGroupByKey= null;

-	private IResource fResource= null;

-	private IMarker fMarker= null;

-	private List fMarkers= null;

-	private ArrayList fAttributes;

-	private int fSelectedMarkerIndex;

-	private long fModificationStamp= IResource.NULL_STAMP;

-	

-	public SearchResultViewEntry(Object groupByKey, IResource resource) {

-		fGroupByKey= groupByKey;

-		fResource= resource;

-	}

-	

-	//---- Accessors ------------------------------------------------

-	public Object getGroupByKey() {

-		return fGroupByKey;

-	}

-

-	void setGroupByKey(Object groupByKey) {

-		fGroupByKey= groupByKey;

-	}

-	

-	public IResource getResource() {

-		return fResource;

-	}

-	

-	public int getMatchCount() {

-		if (fMarkers != null)

-			return fMarkers.size();

-		if (fMarkers == null && fMarker != null)

-			return 1;

-		return 0;

-	}

-	

-	List getAttributesPerMarker() {

-		if (fAttributes == null)

-			return new ArrayList(0);

-		return fAttributes;

-	}

-	

-	long getModificationStamp() {

-		return fModificationStamp;

-	}

-	

-	void clearMarkerList() {

-		fMarker= null;

-		if (fMarkers != null)

-			fMarkers.clear();

-	}

-		

-	void add(IMarker marker) {

-		if (fMarker == null) {

-			fMarker= marker;

-			if (fMarkers != null)

-				fMarkers.add(marker);

-			return;

-		}

-		if (fMarkers == null) {

-			fMarkers= new ArrayList(10);

-			fMarkers.add(fMarker);

-		}

-		fMarkers.add(marker);

-	}

-	

-	void setSelectedMarkerIndex(int index) {

-		fSelectedMarkerIndex= index;

-	}

-	

-	public IMarker getSelectedMarker() {

-		fSelectedMarkerIndex= Math.min(fSelectedMarkerIndex, getMatchCount() - 1);

-		if (fMarkers == null && fMarker == null)

-			return null;

-		if (fMarkers != null && fSelectedMarkerIndex >= 0)

-			return (IMarker)fMarkers.get(fSelectedMarkerIndex);

-		return fMarker;

-	}

-	

-	List getMarkers() {

-		if (fMarkers == null && fMarker == null)

-			return new ArrayList(0);

-		else if (fMarkers == null && fMarker != null) {

-			List markers= new ArrayList(1);

-			markers.add(fMarker);

-			return markers;

-		}

-		return fMarkers;

-	}

-	

-	boolean contains(IMarker marker) {

-		if (fMarkers == null && fMarker == null)

-			return false;

-		if (fMarkers == null)

-			return fMarker.equals(marker);

-		else

-			return fMarkers.contains(marker);

-	}

-	

-	void remove(IMarker marker) {

-		if (marker == null)

-			return;

-			

-		if (fMarkers == null) {

-			if (fMarker != null && fMarker.equals(marker))

-				fMarker= null;

-		}

-		else {

-			fMarkers.remove(marker);

-			if (fMarkers.size() == 1) {

-				fMarker= (IMarker)fMarkers.get(0);

-				fMarkers= null;

-			}

-		}

-	}

-	

-	void backupMarkers() {

-		if (fResource != null)

-			fModificationStamp= fResource.getModificationStamp();

-		List markers= getMarkers();

-		fAttributes= new ArrayList(markers.size());

-		Iterator iter= markers.iterator();

-		while (iter.hasNext()) {

-			IMarker marker= (IMarker)iter.next();

-			Map attributes= null;

-			try {

-				attributes= marker.getAttributes();

-			} catch (CoreException ex) {

-				// don't backup corrupt marker

-				continue;

-			}

-			fAttributes.add(attributes);

-		}

-	}

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
deleted file mode 100644
index e4cfdac..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowNextResultAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowNextResultAction.java
deleted file mode 100644
index c23f4f7..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowNextResultAction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-class ShowNextResultAction extends Action {

-	

-	private SearchResultViewer fViewer;

-

-	public ShowNextResultAction(SearchResultViewer viewer) {

-		super(SearchMessages.getString("SearchResultView.showNext.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_NEXT);

-		setToolTipText(SearchMessages.getString("SearchResultView.showNext.tooltip")); //$NON-NLS-1$

-		fViewer= viewer;

-	}

-	

-	public void run() {

-		fViewer.showNextResult();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowPreviousResultAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowPreviousResultAction.java
deleted file mode 100644
index 2d722ce..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowPreviousResultAction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-class ShowPreviousResultAction extends Action {

-	

-	private SearchResultViewer fViewer;

-

-	public ShowPreviousResultAction(SearchResultViewer viewer) {

-		super(SearchMessages.getString("SearchResultView.showPrev.text")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_PREV);

-		setToolTipText(SearchMessages.getString("SearchResultView.showPrev.tooltip")); //$NON-NLS-1$

-		fViewer= viewer;

-	}

-	

-	public void run() {

-		fViewer.showPreviousResult();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchAction.java
deleted file mode 100644
index 33c3574..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import org.eclipse.jface.action.Action;

-

-import org.eclipse.core.resources.IMarker;

-

-class ShowSearchAction extends Action {

-	private Search fSearch;

-	private IMarker[] fMarkerArrayTemplate= new IMarker[0];

-	

-	/**

-	 *	Create a new instance of this class

-	 */

-	public ShowSearchAction(Search search) {

-		fSearch= search;

-		String desc= search.getShortDescription();

-		setText(desc);

-		setToolTipText(desc);

-		setImageDescriptor(search.getImageDescriptor());

-	}

-	/**

-	 *	Invoke the resource wizard selection wizard

-	 *

-	 *	@param browser org.eclipse.jface.parts.Window

-	 */

-	public void run() {

-		if (fSearch != SearchManager.getDefault().getCurrentSearch())

-			SearchManager.getDefault().setCurrentSearch(fSearch);

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchesAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchesAction.java
deleted file mode 100644
index f31acf1..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/ShowSearchesAction.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.swt.graphics.Image;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.viewers.LabelProvider;

-

-import org.eclipse.search.internal.ui.util.ListDialog;

-

-/**

- * Invoke the resource creation wizard selection Wizard.

- * This action will retarget to the active view.

- */

-class ShowSearchesAction extends Action {

-

-	private static final LabelProvider fgLabelProvider= new LabelProvider() {

-		public String getText(Object element) {

-			if (!(element instanceof ShowSearchAction))

-				return ""; //$NON-NLS-1$

-			return ((ShowSearchAction)element).getText();

-		}

-		public Image getImage(Object element) {

-			if (!(element instanceof ShowSearchAction))

-				return null;

-			return ((ShowSearchAction)element).getImageDescriptor().createImage();

-		}

-	};

-

-	/**

-	 *	Create a new instance of this class

-	 */

-	public ShowSearchesAction() {

-		super(SearchMessages.getString("ShowOtherSearchesAction.label")); //$NON-NLS-1$

-		setToolTipText(SearchMessages.getString("ShowOtherSearchesAction.tooltip")); //$NON-NLS-1$

-	}

-	/*

-	 * Overrides method from Action

-	 */

-	public void run() {

-		run(false);

-	}

-	 

-	public void run(boolean showAll) {

-		Iterator iter= SearchManager.getDefault().getPreviousSearches().iterator();

-		int cutOffSize;

-		if (showAll)

-			cutOffSize= 0;

-		else

-			cutOffSize= SearchDropDownAction.RESULTS_IN_DROP_DOWN;

-		int size= SearchManager.getDefault().getPreviousSearches().size() - cutOffSize;

-		Search selectedSearch= SearchManager.getDefault().getCurrentSearch();

-		Action selectedAction = null;

-		ArrayList input= new ArrayList(size);

-		int i= 0;

-		while (iter.hasNext()) {

-			Search search= (Search)iter.next();

-			if (i++ < cutOffSize)

-				continue;

-			Action action= new ShowSearchAction(search);

-			input.add(action);

-			if (selectedSearch == search)

-				selectedAction= action;

-		}

-

-		// Open a list dialog.

-		String title;

-		String message;

-		if (showAll) {

-			title= SearchMessages.getString("PreviousSearchesDialog.title"); //$NON-NLS-1$

-			message= SearchMessages.getString("PreviousSearchesDialog.message"); //$NON-NLS-1$

-		}

-		else {

-			title= SearchMessages.getString("OtherSearchesDialog.title"); //$NON-NLS-1$

-			message= SearchMessages.getString("OtherSearchesDialog.message"); //$NON-NLS-1$

-		}		

-		ListDialog dlg= new ListDialog(SearchPlugin.getActiveWorkbenchShell(),input, title, message, new SearchResultContentProvider(), fgLabelProvider);

-		if (selectedAction != null) {

-			Object[] selected= new Object[1];

-			selected[0]= selectedAction;

-			dlg.setInitialSelections(selected);

-		}

-		if (dlg.open() == dlg.OK) {

-			List result= Arrays.asList(dlg.getResult());

-			if (result != null && result.size() == 1) {

-				((ShowSearchAction)result.get(0)).run();

-			}

-		}

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
deleted file mode 100644
index c6f7e4f..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.util.Iterator;

-

-import org.eclipse.swt.custom.BusyIndicator;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Menu;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.action.ActionContributionItem;

-import org.eclipse.jface.action.IMenuCreator;

-import org.eclipse.jface.viewers.ViewerSorter;

-

-/**

- * Drop down action that holds the currently registered sort actions.

- */

-class SortDropDownAction extends Action implements IMenuCreator {

-

-	private SearchResultViewer fViewer;

-	private String fPageId;

-	private Menu fMenu;

-	private String fCheckedId;

-

-	public SortDropDownAction(SearchResultViewer viewer) {

-		super(SearchMessages.getString("SortDropDownAction.label")); //$NON-NLS-1$

-		SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_SORT);

-		fViewer= viewer;

-		fCheckedId= ""; //$NON-NLS-1$

-		setToolTipText(SearchMessages.getString("SortDropDownAction.tooltip")); //$NON-NLS-1$

-		setMenuCreator(this);

-	}

-

-	public void dispose() {

-		fViewer= null;

-		fPageId= null;

-		fCheckedId= null;

-	}

-

-	public Menu getMenu(Control parent) {

-		return null;

-	}

-

-	void setPageId(String pageId) {

-		fPageId= pageId;

-	}

-

-	public Menu getMenu(final Menu parent) {

-		Menu menu= new Menu(parent);

-		Iterator iter= SearchPlugin.getDefault().getSorterDescriptors().iterator();

-		while (iter.hasNext()) {

-			final SorterDescriptor sorterDesc= (SorterDescriptor) iter.next();

-			if (!sorterDesc.getPageId().equals(fPageId) && !sorterDesc.getPageId().equals("*")) //$NON-NLS-1$

-				continue;

-			final ViewerSorter sorter= sorterDesc.createObject();

-			if (sorter != null) {

-				final Action action= new Action() {

-					public void run() {

-						if (!fCheckedId.equals(sorterDesc.getId())) {

-							fCheckedId= sorterDesc.getId();

-							BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {

-								public void run() {

-									fViewer.setSorter(sorter);

-								}

-							});

-						}

-					}

-				};

-				action.setText(sorterDesc.getLabel());

-				action.setImageDescriptor(sorterDesc.getImage());

-				action.setToolTipText(sorterDesc.getToolTipText());

-				action.setChecked(fCheckedId.equals(sorterDesc.getId()));

-				addActionToMenu(menu, action);

-			}

-		}

-		return menu;

-	}

-

-	protected void addActionToMenu(Menu parent, Action action) {

-		ActionContributionItem item= new ActionContributionItem(action);

-		item.fill(parent, -1);

-	}

-

-    public void run() {

-		// nothing to do

-	    }

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SorterDescriptor.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SorterDescriptor.java
deleted file mode 100644
index 0e818a1..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SorterDescriptor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui;

-

-import java.net.MalformedURLException;

-import java.net.URL;

-

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.ViewerSorter;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-

-import org.eclipse.search.internal.ui.util.ExceptionHandler;

-

-/**

- * Proxy that represents a sorter.

- */

-class SorterDescriptor {

-

-	public final static String SORTER_TAG= "sorter"; //$NON-NLS-1$

-	private final static String ID_ATTRIBUTE= "id"; //$NON-NLS-1$

-	private final static String PAGE_ID_ATTRIBUTE= "pageId"; //$NON-NLS-1$

-	private final static String ICON_ATTRIBUTE= "icon"; //$NON-NLS-1$

-	private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$

-	private final static String LABEL_ATTRIBUTE= "label"; //$NON-NLS-1$

-	private final static String TOOLTIP_ATTRIBUTE= "tooltip"; //$NON-NLS-1$

-	

-	private IConfigurationElement fElement;

-	

-	/**

-	 * Creates a new sorter node with the given configuration element.

-	 */

-	public SorterDescriptor(IConfigurationElement element) {

-		fElement= element;

-	}

-

-	/**

-	 * Creates a new sorter from this node.

-	 */

-	public ViewerSorter createObject() {

-		try {

-			return (ViewerSorter)fElement.createExecutableExtension(CLASS_ATTRIBUTE);

-		} catch (CoreException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		} catch (ClassCastException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		}

-	}

-	

-	//---- XML Attribute accessors ---------------------------------------------

-	

-	/**

-	 * Returns the sorter's id.

-	 */

-	public String getId() {

-		return fElement.getAttribute(ID_ATTRIBUTE);

-	}

-	 

-	/**

-	 * Returns the sorter's image

-	 */

-	public ImageDescriptor getImage() {

-		String imageName= fElement.getAttribute(ICON_ATTRIBUTE);

-		if (imageName == null)

-			return null;

-		URL url;

-		try {

-			url= new URL(fElement.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL(), imageName);

-		} catch (java.net.MalformedURLException ex) {

-			ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$

-			return null;

-		}

-		return ImageDescriptor.createFromURL(url);

-	}

-

-	/**

-	 * Returns the sorter's label.

-	 */

-	public String getLabel() {

-		return fElement.getAttribute(LABEL_ATTRIBUTE);

-	}

-	

-	/**

-	 * Returns the sorter's preferred size

-	 */

-	public String getToolTipText() {

-		return fElement.getAttribute(TOOLTIP_ATTRIBUTE);

-	}

-

-	/**

-	 * Returns the sorter's preferred size

-	 */

-	public String getPageId() {

-		return fElement.getAttribute(PAGE_ID_ATTRIBUTE);

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GotoMarkerAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GotoMarkerAction.java
deleted file mode 100644
index 8fc90aa..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GotoMarkerAction.java
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GroupByKeyComputer.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GroupByKeyComputer.java
deleted file mode 100644
index d33db3f..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/GroupByKeyComputer.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.text;

-

-import org.eclipse.core.resources.IMarker;

-

-import org.eclipse.search.ui.IGroupByKeyComputer;

-

-class GroupByKeyComputer implements IGroupByKeyComputer {

-

-	public Object computeGroupByKey(IMarker marker) {

-		if (marker == null)

-			return null;

-		else

-			return marker.getResource();

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchOperation.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchOperation.java
deleted file mode 100644
index d560596..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchOperation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.text;

-

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.util.Assert;

-

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.ui.actions.WorkspaceModifyOperation;

-

-import org.eclipse.search.internal.core.ISearchScope;

-import org.eclipse.search.internal.core.text.TextSearchEngine;

-import org.eclipse.search.internal.ui.SearchMessages;

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.internal.ui.SearchPluginImages;

-

-/**

- * An operation to perform a regular text search.

- */

-public class TextSearchOperation extends WorkspaceModifyOperation {

-

-	public static final int NO_PRIORITY_CHANGE= -1;

-	

-	private IWorkspace fWorkspace;

-	private String fPattern;

-	private String fOptions;

-	private ISearchScope fScope;

-	private TextSearchResultCollector fCollector;

-	

-	/**

-	 * Creates a new text search operation.

-	 */

-	public TextSearchOperation(IWorkspace workspace,  String pattern, String options, 

-			ISearchScope scope, TextSearchResultCollector collector)  {

-		Assert.isNotNull(collector);

-		fWorkspace= workspace;

-		fPattern= pattern;

-		fOptions= options;

-		fScope= scope;

-		fCollector= collector;

-		fCollector.setOperation(this);

-	}

-	

-	/**

-	 * The actual algorithm.

-	 */

-	protected void execute(IProgressMonitor monitor) throws CoreException {

-		fCollector.setProgressMonitor(monitor);		

-		TextSearchEngine engine= new TextSearchEngine();

-		engine.search(fWorkspace, fPattern, fOptions, fScope, fCollector);

-	}	

-	

-	String getDescription() {

-		return "\"" + fPattern + "\"" + SearchMessages.getString("TextSearchOperation.descriptionPostfix"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

-	}

-	

-	ImageDescriptor getImageDescriptor() {

-		return SearchPluginImages.DESC_OBJ_TSEARCH_DPDN;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
deleted file mode 100644
index a7b3852..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchResultCollector.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchResultCollector.java
deleted file mode 100644
index f1df61a..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchResultCollector.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.text;

-

-import java.util.HashMap;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-

-import org.eclipse.search.internal.core.text.ITextSearchResultCollector;

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.ui.ISearchResultView;

-import org.eclipse.search.ui.SearchUI;

-import org.eclipse.search.internal.ui.SearchMessages;

-

-public class TextSearchResultCollector implements ITextSearchResultCollector {

-	

-	private static final String SPACE_MATCHES= " " + SearchMessages.getString("SearchResultCollector.matches"); //$NON-NLS-2$ //$NON-NLS-1$

-

-	private IProgressMonitor fMonitor;

-	private ISearchResultView fView;

-	private TextSearchOperation fOperation;

-	private int fMatchCount= 0;

-		

-	/**

-	 * Returns the progress monitor used to setup and report progress.

-	 */

-	public IProgressMonitor getProgressMonitor() {

-		return fMonitor;

-	}

-	

-	void setProgressMonitor(IProgressMonitor pm) {

-		fMonitor= pm;

-	}

-	

-	/**

-	 * Called before the actual search starts.

-	 */

-	public void aboutToStart() throws CoreException {

-		fView= SearchUI.getSearchResultView();

-		fMatchCount= 0;

-		if (fView != null) {

-			fView.searchStarted(

-				TextSearchPage.EXTENSION_POINT_ID,

-				fOperation.getDescription(),

-				fOperation.getImageDescriptor(),

-				null,

-				null,

-				new GotoMarkerAction(),

-				new GroupByKeyComputer(),

-				fOperation);

-		}

-	}

-	 

-	/**

-	 * Accepts the given search result.

-	 */

-	public void accept(final IResource resource, String line, int start, int length, final int lineNumber) throws CoreException {

-		IMarker marker= resource.createMarker(SearchUI.SEARCH_MARKER);

-		HashMap attributes= new HashMap(4);

-		attributes.put(SearchUI.LINE, line);

-		attributes.put(IMarker.CHAR_START, new Integer(start));

-		attributes.put(IMarker.CHAR_END, new Integer(start + length));

-		attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));

-		marker.setAttributes(attributes);

-		

-		fView.addMatch(resource.getFullPath().lastSegment().toString(), resource, resource, marker);

-		if (!getProgressMonitor().isCanceled())

-			getProgressMonitor().subTask(++fMatchCount + SPACE_MATCHES);

-	}

-	

-	/**

-	 * Called when the search has ended.

-	 */

-	public void done() {

-		if (!getProgressMonitor().isCanceled())

-			getProgressMonitor().setTaskName(SearchMessages.getString("SearchResultCollector.done") + ": " + fMatchCount + SPACE_MATCHES + "   "); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

-		if (fView != null)

-			fView.searchFinished();

-			

-		// Cut no longer unused references because the collector might be re-used

-		fView= null;

-		fMonitor= null;

-	}

-

-	void setOperation(TextSearchOperation operation) {

-		fOperation= operation;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExceptionHandler.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExceptionHandler.java
deleted file mode 100644
index 4461f0b..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExceptionHandler.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import java.io.PrintWriter;

-import java.io.StringWriter;

-import java.lang.reflect.InvocationTargetException;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-

-import org.eclipse.swt.widgets.Shell;

-

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.jface.dialogs.MessageDialog;

-

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.ui.SearchUI;

-

-/**

- * Shows an error dialog for exceptions that contain an <code>IStatus</code>.

- * If the throwable passed to the methods is of a kind that the methods can handle, 

- * the error dialog is shown and <code>true</code> is returned. Otherwise <code>false

- * </code>is returned, and the client has to handle the error itself. If the passed

- * throwable is of type <code>InvocationTargetException</code> the wrapped excpetion

- * is considered.

- */

-public class ExceptionHandler {

-

-	private static ExceptionHandler fgInstance= new ExceptionHandler();

-

-	/**

-	 * Shows an error dialog for exceptions that contain an <code>IStatus</code>.

-	 */

-	public static boolean handle(Throwable t, String title, String message) {

-		return handle(t, SearchPlugin.getActiveWorkbenchShell(), title, message);	

-	}

-	/**

-	 * Shows an error dialog for exceptions that contain an <code>IStatus</code>.

-	 */

-	public static boolean handle(Throwable t, Shell shell, String title, String message) {

-		if (fgInstance == null)

-			return false;

-		return fgInstance.perform(t, shell, title, message);	

-	}

-	/**

-	 * Logs the given exception using the platforms logging mechanism.

-	 */

-	public static void log(Throwable t, String message) {

-		SearchPlugin.log(new Status(IStatus.ERROR, SearchUI.PLUGIN_ID, 

-			IStatus.ERROR, message, t));

-	}

-	/**

-	 * Actually displays the error message. Subclasses may override the method to

-	 * perform their own error handling.

-	 */

-	protected boolean perform(Throwable t, Shell shell, String title, String message) {

-		if (t instanceof InvocationTargetException)

-			t= ((InvocationTargetException)t).getTargetException();

-		if (handleCoreException(t, shell, title, message))

-			return true;

-		return handleCriticalExceptions(t, shell, title, message);

-	}

-

-	protected boolean handleCoreException(Throwable t, Shell shell, String title, String message) {

-		IStatus status= null;

-		if (t instanceof CoreException) {

-			status= ((CoreException)t).getStatus();

-			if (status != null)

-				ErrorDialog.openError(shell, title, message, status);

-			else

-				displayMessageDialog(t, shell, title, message);

-			return true;

-		}

-		return false;

-	}

-

-	protected boolean handleCriticalExceptions(Throwable t, Shell shell, String title, String message) {

-		if (t instanceof RuntimeException || t instanceof Error) {

-			log(t, message);

-			displayMessageDialog(t, shell, title, message);

-			return true;

-		}

-		return false;	

-	}

-	/**

-	 * Shows the error in a message dialog

-	 */

-	protected void displayMessageDialog(Throwable t, Shell shell, String title, String message) {

-		StringWriter msg= new StringWriter();

-		if (message != null) {

-			msg.write(message);

-			msg.write("\n\n"); //$NON-NLS-1$

-		}

-		if (t.getMessage() == null || t.getMessage().length() == 0)

-			msg.write(t.toString());

-		else

-			msg.write(t.getMessage());

-		MessageDialog.openError(shell, title, msg.toString());			

-	}

-	/**

-	 * Shows a dialog containing the stack trace of the exception

-	 */

-	public static void showStackTraceDialog(Throwable t, Shell shell, String title) {

-		StringWriter writer= new StringWriter();

-		t.printStackTrace(new PrintWriter(writer));

-		MessageDialog.openError(shell, title, writer.toString());

-	}	

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExtendedDialogWindow.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExtendedDialogWindow.java
deleted file mode 100644
index 3ab0748..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ExtendedDialogWindow.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import java.lang.reflect.InvocationTargetException;

-import java.util.HashMap;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Cursor;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Shell;

-

-import org.eclipse.jface.dialogs.ControlEnableState;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.jface.dialogs.MessageDialog;

-import org.eclipse.jface.operation.IRunnableContext;

-import org.eclipse.jface.operation.IRunnableWithProgress;

-import org.eclipse.jface.operation.ModalContext;

-import org.eclipse.jface.resource.JFaceResources;

-import org.eclipse.jface.util.Assert;

-import org.eclipse.jface.wizard.ProgressMonitorPart;

-

-import org.eclipse.core.runtime.IProgressMonitor;

-

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.internal.ui.SearchMessages;

-

-

-public abstract class ExtendedDialogWindow extends Dialog  implements IRunnableContext {

-	

-	private Control fContents;

-	private Button fCancelButton;

-	private Button fSearchButton;

-	

-	private MessageLine fMessageLine;

-	private String fPerformActionLabel= JFaceResources.getString("finish"); //$NON-NLS-1$

-	

-	// The number of long running operation executed from the dialog.	

-	private long fActiveRunningOperations;

-	private boolean fOperationCancelableState;

-

-	// The progress monitor

-	private ProgressMonitorPart fProgressMonitorPart;

-	private MessageDialog fWindowClosingDialog;

-	private static int PROGRESS_INDICATOR_HEIGHT= 12;

-	private static final String FOCUS_CONTROL= "focusControl"; //$NON-NLS-1$

-	private Cursor fWaitCursor;

-	private Cursor fArrowCursor;

-

-

-	public ExtendedDialogWindow(Shell shell) {

-		super(shell);

-	}

-	

-	//---- Hooks to reimplement in subclasses -----------------------------------

-	

-	/**

-	 * Hook called when the user has pressed the button to perform

-	 * the dialog's action. If the method returns <code>false</code>

-	 * the dialog stays open. Otherwise the dialog is going to be closed.

-	 */

-	protected boolean performAction() {

-		return true;

-	}

-	 

-	/**

-	 * Hook called when the user has pressed the button to cancel

-	 * the dialog. If the method returns <code>false</code> the dialog 

-	 * stays open. Otherwise the dialog is going to be closed.

-	 */

-	protected boolean performCancel() {

-		return true;

-	}

-	 

-	//---- UI creation ----------------------------------------------------------

-

-	/**

-	 * Create the page area.

-	 */

-	protected abstract Control createPageArea(Composite parent); 

-	 

-	/**

-	 * Creates and returns the contents of the dialog's 

-	 * button bar.

-	 *

-	 * Subclasses may override.

-	 *

-	 * @param parent the parent composite to contain the button bar

-	 * @return the button bar control

-	 */

-	protected Control createButtonBar(Composite parent) {

-		GridData gd;

-		Composite composite= new Composite(parent, SWT.NULL);

-		GridLayout layout= new GridLayout();

-		layout.numColumns= 2;

-		layout.marginHeight= 0;

-		layout.marginWidth= 0;

-		composite.setLayout(layout);

-		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-

-		fMessageLine= new MessageLine(composite);

-		fMessageLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-		fMessageLine.setMessage(""); //$NON-NLS-1$

-

-		return super.createButtonBar(composite);

-	}

-

-	/**

-	 * Add buttons to the dialog's button bar.

-	 *

-	 * Subclasses may override.

-	 *

-	 * @param parent the button bar composite

-	 */

-	protected void createButtonsForButtonBar(Composite parent) {

-		

-		fSearchButton= createButton(parent, IDialogConstants.FINISH_ID, fPerformActionLabel, true);

-		fCancelButton= createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

-	}

-	 

-	/**

-	 * Creates the layout of the extended dialog window.

-	 */

-	protected Control createDialogArea(Composite parent) {

-		Composite result= new Composite(parent, SWT.NULL);

-		GridLayout layout= new GridLayout();

-		layout.marginWidth= 0;

-		layout.marginHeight= 0;

-		layout.horizontalSpacing= 0;

-		layout.verticalSpacing= 0;

-		result.setLayout(layout);

-		result.setLayoutData(new GridData(GridData.FILL_BOTH));

-		

-		fContents= createPageArea(result);

-		

-		// Insert a progress monitor

-		GridLayout pmlayout= new GridLayout();

-		pmlayout.numColumns= 1;

-		fProgressMonitorPart= new ProgressMonitorPart(result, pmlayout, SWT.DEFAULT);

-		fProgressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-		fProgressMonitorPart.setVisible(false);

-

-

-		Label separator= new Label(result, SWT.SEPARATOR | SWT.HORIZONTAL);

-		separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-		

-		return result;

-	}

-	

-	

-	protected void buttonPressed(int buttonId) {

-		switch (buttonId) {

-			case IDialogConstants.FINISH_ID:

-				if (performAction())

-					close();

-				break;

-			case IDialogConstants.CANCEL_ID:

-				if (fActiveRunningOperations == 0)

-					close();

-				break;	

-		}

-	}

-	

-	//---- Setters and Getters --------------------------------------------------

-	

-	/**

-	 * Sets the label text of the perform action button.

-	 */

-	public void setPerformActionLabel(String label) {

-		fPerformActionLabel= label;

-	} 

-

-	/**

-	 * Set the enable state of the perform action button.

-	 */

-	public void setPerformActionEnabled(boolean state) {

-		if (fSearchButton != null)

-			fSearchButton.setEnabled(state);

-	} 

-

-	//---- Operation stuff ------------------------------------------------------

-	

-	/**

-	 * Runs the given <code>IRunnableWithProgress</code> with the progress monitor for this

-	 * wizard dialog.  

-	 * @param fork if true, it is run in a separate thread

-	 * @param cancelable specifies whether to enable the cancel button or not

-	 * @param runnable the runnable to run

-	 */

-	public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {

-		// The operation can only be canceled if it is executed in a separate thread.

-		// Otherwise the UI is blocked anyway.

-		Object state= null;

-		try {

-			fActiveRunningOperations++;

-			state= aboutToStart(fork && cancelable);

-			ModalContext.run(runnable, fork, getProgressMonitor(), getShell().getDisplay());

-		} finally {

-			if (state != null)

-				stopped(state);

-			fActiveRunningOperations--;

-		}

-	}

-

-	/**

-	 * Returns the progress monitor. If the wizard dialog doesn't

-	 * have a progress monitor <code>null</code> is returned.

-	 */

-	protected IProgressMonitor getProgressMonitor() {

-		return fProgressMonitorPart;

-	}

-	

-	/**

-	 * About to start a long running operation tiggered through

-	 * the wizard. So show the progress monitor and disable

-	 * the wizard.

-	 * @return The saved UI state.

-	 */

-	protected synchronized Object aboutToStart(boolean enableCancelButton) {

-		HashMap savedState= null;

-		fOperationCancelableState= enableCancelButton;

-		Shell shell= getShell();

-		if (shell != null) {

-			Display d= shell.getDisplay();

-			

-			// Save focus control

-			Control focusControl= d.getFocusControl();

-			if (focusControl != null && focusControl.getShell() != shell)

-				focusControl= null;

-				

-			// Set the busy cursor to all shells.

-			fWaitCursor= new Cursor(d, SWT.CURSOR_WAIT);

-			setDisplayCursor(d, fWaitCursor);

-					

-			// Set the arrow cursor to the cancel component.

-			fArrowCursor= new Cursor(d, SWT.CURSOR_ARROW);

-			fCancelButton.setCursor(fArrowCursor);

-	

-			// Deactivate shell

-			savedState= saveUIState(enableCancelButton);

-			if (focusControl != null)

-				savedState.put(FOCUS_CONTROL, focusControl);

-				

-			// Attach the progress monitor part to the cancel button

-			fProgressMonitorPart.attachToCancelComponent(fCancelButton);

-			fProgressMonitorPart.setVisible(true);

-		}

-		

-		return savedState;

-	}

-	

-	/**

-	 * A long running operation triggered through the wizard

-	 * was stopped either by user input or by normal end.

-	 * @param savedState The saveState returned by <code>aboutToStart</code>.

-	 * @see #aboutToStart(boolean)

-	 */

-	protected synchronized void stopped(Object savedState) {

-		Assert.isTrue( savedState instanceof HashMap);

-		Shell shell= getShell();

-		if (shell != null) {

-	

-			fProgressMonitorPart.setVisible(false);	

-			fProgressMonitorPart.removeFromCancelComponent(fCancelButton);

-					

-			HashMap state= (HashMap)savedState;

-			restoreUIState(state);

-	

-			setDisplayCursor(shell.getDisplay(), null);	

-			fCancelButton.setCursor(null);

-			fWaitCursor.dispose();

-			fWaitCursor= null;

-			fArrowCursor.dispose();

-			fArrowCursor= null;

-			Control focusControl= (Control)state.get(FOCUS_CONTROL);

-			if (focusControl != null && ! focusControl.isDisposed())

-				focusControl.setFocus();

-		}

-	}

-	

-	private void asyncSetOperationCancelButtonEnabled(final boolean b) {

-		Shell shell= getShell();

-		if (shell != null) {

-			shell.getDisplay().asyncExec(new Runnable() {

-				public void run() {

-					setOperationCancelButtonEnabled(b);

-				}

-			});

-		}

-	}

-	

-	private void setOperationCancelButtonEnabled(boolean b) {

-		if (fActiveRunningOperations > 0) {

-			fCancelButton.setEnabled(b);

-		}

-	}

-	

-	private void setDisplayCursor(Display d, Cursor c) {

-		Shell[] shells= d.getShells();

-		for (int i= 0; i < shells.length; i++)

-			shells[i].setCursor(c);

-	}	

-

-	//---- UI state save and restoring ---------------------------------------------

-	

-	private void restoreUIState(HashMap state) {

-		restoreEnableState(fCancelButton, state, "cancel"); //$NON-NLS-1$

-		restoreEnableState(fSearchButton, state, "search"); //$NON-NLS-1$

-		ControlEnableState pageState= (ControlEnableState)state.get("tabForm"); //$NON-NLS-1$

-		pageState.restore();

-	}

-	

-	/**

-	 * Restores the enable state of the given control.

-	 * @private

-	 */

-	protected void restoreEnableState(Control w, HashMap h, String key) {

-		if (!w.isDisposed()) {

-			Boolean b= (Boolean)h.get(key);

-			if (b != null)

-				w.setEnabled(b.booleanValue());

-		}

-	}

-	

-	private HashMap saveUIState(boolean keepCancelEnabled) {

-		HashMap savedState= new HashMap(10);

-		saveEnableStateAndSet(fCancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$

-		saveEnableStateAndSet(fSearchButton, savedState, "search", false); //$NON-NLS-1$

-		savedState.put("tabForm", ControlEnableState.disable(fContents)); //$NON-NLS-1$

-		

-		return savedState;

-	}

-	

-	private void saveEnableStateAndSet(Control w, HashMap h, String key, boolean enabled) {

-		if (!w.isDisposed()) {

-			h.put(key, new Boolean(w.isEnabled()));

-			w.setEnabled(enabled);

-		}	

-	}	

-

-	protected void handleShellCloseEvent() {

-		if (okToClose())

-			super.handleShellCloseEvent();

-	}

-

-	/**

-	 * The dialog is going to be closed. Check if there is a running

-	 * operation. If so, post an alert saying that the wizard can't

-	 * be closed.

-	 */

-	public boolean okToClose() {

-		if (fActiveRunningOperations > 0) {

-			synchronized (this) {

-				fWindowClosingDialog= createClosingDialog();

-			}	

-			fWindowClosingDialog.open();

-			synchronized (this) {

-				fWindowClosingDialog= null;

-			}

-			return false;

-		}

-		return true;

-	}

-	

-	private MessageDialog createClosingDialog() {

-		MessageDialog result= 

-			new MessageDialog(

-				getShell(),

-				SearchMessages.getString("SearchDialogClosingDialog.title"),  //$NON-NLS-1$

-				null, 

-				SearchMessages.getString("SearchDialogClosingDialog.message"),  //$NON-NLS-1$

-				MessageDialog.QUESTION, 

-				new String[] {IDialogConstants.OK_LABEL}, 

-				0); 

-		return result;		

-	}

-

-	/**

-	 * Returns the cancel component that is to be used to cancel 

-	 * a long running operation.

-	 */

-	protected Control getCancelComponent() {

-		return fCancelButton;

-	}	

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/FileTypeEditor.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/FileTypeEditor.java
deleted file mode 100644
index 85bff7d..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/FileTypeEditor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import java.util.Arrays;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.Set;

-import java.util.StringTokenizer;

-

-import org.eclipse.swt.events.DisposeEvent;

-import org.eclipse.swt.events.DisposeListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.swt.widgets.Widget;

-

-import org.eclipse.ui.IEditorRegistry;

-

-import org.eclipse.search.internal.ui.SearchMessages;

-

-public class FileTypeEditor extends SelectionAdapter implements DisposeListener, SelectionListener {

-	

-	private Text fTextField;

-	private Button fBrowseButton;

-	private IEditorRegistry fResourceEditorRegistry;

-

-	final static String TYPE_DELIMITER= SearchMessages.getString("FileTypeEditor.typeDelimiter"); //$NON-NLS-1$

-

-	public FileTypeEditor(IEditorRegistry registry, Text textField, Button browseButton) {

-		fResourceEditorRegistry= registry;

-		fTextField= textField;

-		fBrowseButton= browseButton;

-		

-		fTextField.addDisposeListener(this);

-		fBrowseButton.addDisposeListener(this);

-		fBrowseButton.addSelectionListener(this);

-	}

-	

-	public void widgetDisposed(DisposeEvent event) {

-		Widget widget= event.widget;

-		if (widget == fTextField) 

-			fTextField= null;

-		else if (widget	== fBrowseButton)

-			fBrowseButton= null;

-	}

-	

-	public void widgetSelected(SelectionEvent event) {

-		if (event.widget == fBrowseButton)

-			handleBrowseButton();

-	}

-		

-	public void widgetDoubleSelected(SelectionEvent event) {

-	}

-	/**

-	 *	Answer a collection of the currently-specified resource types

-	 *

-	 *	@return java.util.Vector

-	 */

-	public Set getFileTypes() {

-		Set result= new HashSet();

-			StringTokenizer tokenizer= new StringTokenizer(fTextField.getText(), TYPE_DELIMITER);

-

-			while (tokenizer.hasMoreTokens()) {

-				String currentExtension= tokenizer.nextToken().trim();

-					result.add(currentExtension);

-			}

-		return result;

-	}

-	/**

-	 *	Populate self's import types field based upon the passed types collection

-	 *

-	 *	@param types java.util.Vector

-	 */

-	public void setFileTypes(Set types) {

-		StringBuffer result= new StringBuffer();

-		Iterator typesIter= types.iterator();

-		boolean first= true;

-		while (typesIter.hasNext()) {

-			if (!first) {

-				result.append(TYPE_DELIMITER);

-				result.append(" "); //$NON-NLS-1$

-			} else

-				first= false;

-			result.append(typesIter.next());

-		}

-		fTextField.setText(result.toString());

-	}

-	protected void handleBrowseButton() {

-		TypeFilteringDialog dialog= new TypeFilteringDialog(fTextField.getShell(), getFileTypes());

-		if (dialog.open() == dialog.OK) {

-			setFileTypes(new HashSet(Arrays.asList(dialog.getResult())));

-		}

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ListDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ListDialog.java
deleted file mode 100644
index db007ea..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/ListDialog.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.MouseAdapter;

-import org.eclipse.swt.events.MouseEvent;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Table;

-

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.jface.viewers.TableViewer;

-

-import org.eclipse.ui.dialogs.SelectionDialog;

-

-/**

- * Dialog that shows a list of items with icon and label.

- */

-public class ListDialog extends SelectionDialog {

-	private IStructuredContentProvider fContentProvider;

-	private ILabelProvider fLabelProvider;

-	private Object fInput;

-	private TableViewer fViewer;

-	

-	public ListDialog(Shell parent, Object input, String title, String message, IStructuredContentProvider sp, ILabelProvider lp) {

-		super(parent);

-		setTitle(title);

-		setMessage(message);

-		fInput= input;

-		fContentProvider= sp;

-		fLabelProvider= lp;

-	}

-	/*

-	 * Overrides method from Dialog

-	 */

-	protected Control createDialogArea(Composite container) {

-		Composite parent= (Composite) super.createDialogArea(container);

-		createMessageArea(parent);

-		fViewer= new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);

-		fViewer.setContentProvider(fContentProvider);

-

-		final Table table= fViewer.getTable();

-		table.addMouseListener(new MouseAdapter() {

-			public void mouseDoubleClick(MouseEvent e) {

-				okPressed();

-			}

-		});

-		fViewer.setLabelProvider(fLabelProvider);

-		fViewer.setInput(fInput);

-		if (getInitialSelections() != null)

-			fViewer.setSelection(new StructuredSelection(getInitialSelections()));

-		GridData gd= new GridData(GridData.FILL_BOTH);

-		gd.heightHint= convertHeightInCharsToPixels(15);

-		gd.widthHint= convertWidthInCharsToPixels(50);

-		table.setLayoutData(gd);

-		return table;

-	}

-	/*

-	 * Overrides method from Dialog

-	 */

-	protected void okPressed() {

-		// Build a list of selected children.

-		ISelection selection= fViewer.getSelection();

-		if (selection instanceof IStructuredSelection)

-			setResult(((IStructuredSelection)fViewer.getSelection()).toList());

-		super.okPressed();

-	}

-}

-

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/MessageLine.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/MessageLine.java
deleted file mode 100644
index a8eef60..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/MessageLine.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.custom.CLabel;

-import org.eclipse.swt.events.DisposeEvent;

-import org.eclipse.swt.events.DisposeListener;

-import org.eclipse.swt.graphics.Color;

-import org.eclipse.swt.graphics.RGB;

-import org.eclipse.swt.widgets.Composite;

-

-/**

- * A message line. It distinguishs between "normal" messages and errors. 

- * Setting an error message hides a currently displayed message until 

- * <code>clearErrorMessage</code> is called.

- */

-public class MessageLine extends CLabel {

-

-	private String fMessageText;

-	private String fErrorText;

-

-	private Color fDefaultColor;

-	private RGB fErrorRGB;

-	private Color fErrorColor;

-

-	private static RGB fgErrorRGB= new RGB(200, 0, 0);

-

-	/**

-	 * Creates a new message line as a child of the given parent.

-	 * Error message will be shown with in the rgb color 200,0,0.

-	 */

-	public MessageLine(Composite parent) {

-		this(parent, SWT.LEFT);

-	}

-

-	/**

-	 * Creates a new message line as a child of the parent and with the given SWT stylebits.

-	 * Error message will be shown with in the rgb color 200,0,0.

-	 */

-	public MessageLine(Composite parent, int style) {

-		super(parent, style);

-		fDefaultColor= getForeground();

-		fErrorRGB= fgErrorRGB;

-	}

-

-	/**

-	 * Creates a new message line as a child of the parent and with the given SWT stylebits.

-	 * Error message will be shown with in the given rgb color.

-	 */

-	public MessageLine(Composite parent, int style, RGB errorRGB) {

-		super(parent, style);

-		fDefaultColor= getForeground();

-		fErrorRGB= errorRGB;

-	}

-

-	/**

-	 * Clears the currently displayed error message and redisplayes

-	 * the message which was active before the error message was set.

-	 */

-	public void clearErrorMessage() {

-		setErrorMessage(null);

-	}

-

-	/**

-	 * Clears the currently displayed message.

-	 */

-	public void clearMessage() {

-		setMessage(null);

-	}

-

-	/**

-	 * Get the currently displayed error text.

-	 * @return The error message. If no error message is displayed <code>null</code> is returned.

-	 */

-	public String getErrorMessage() {

-		return fErrorText;

-	}

-

-	/**

-	 * Get the currently displayed message.

-	 * @return The message. If no message is displayed <code>null</code> is returned.

-	 */

-	public String getMessage() {

-		return fMessageText;

-	}

-

-	/**

-	 * Sets the default error color used by all message lines.

-	 * Note: a call to this method only affects newly created MessageLines not existing ones. 

-	 */

-	public static void setErrorColor(RGB color) {

-		fgErrorRGB= color;

-	}

-

-	/**

-	     * Display the given error message. A currently displayed message

-	     * is saved and will be redisplayed when the error message is cleared.

-	     */

-	public void setErrorMessage(String message) {

-		fErrorText= message;

-

-		if (message == null) {

-			setMessage(fMessageText);

-		} else {

-			if (fErrorColor == null) {

-				fErrorColor= new Color(getDisplay(), fErrorRGB);

-				addDisposeListener(new DisposeListener() {

-					public void widgetDisposed(DisposeEvent e) {

-						fErrorColor.dispose();

-					}

-				});

-			}

-			setForeground(fErrorColor);

-			setText(message);

-		}

-	}

-

-	/**

-	     * Set the message text. If the message line currently displays an error,

-	     * the message is stored and will be shown after a call to clearErrorMessage

-	     */

-	public void setMessage(String message) {

-		fMessageText= message;

-		if (message == null)

-			message= ""; //$NON-NLS-1$

-		if (fErrorText == null) {

-			setForeground(fDefaultColor);

-			setText(message);

-		}

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/RowLayouter.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/RowLayouter.java
deleted file mode 100644
index 3c1ffdb..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/RowLayouter.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.widgets.Control;

-

-import org.eclipse.jface.util.Assert;

-

-public class RowLayouter {

-

-	public int spanHorizontalAlignment= -1;

-	public int spanGrabExcessHorizontalSpace= -1;

-	public int spanHorizontalSpan= -1;

-	public int spanHorizontalIndent= -1;

-	public int spanWidthHint= -1;

-		

-	public int spanVerticalAlignment= -1;

-	public int spanGrabExcessVerticalSpace= -1;

-	public int spanVerticalSpan= -1;

-	public int spanHeightHint= -1;

-	

-	private int fNumColumns;

-	private boolean fOrder;

-	private Control fLastControl;

-	private GridData[] fDefaultGridDatas= new GridData[4];

-		

-	public RowLayouter(int numColumns) {

-		this(numColumns, false);

-	}

-

-	public RowLayouter(int numColumns, boolean order) {

-		fNumColumns= numColumns;

-		fOrder= order;

-	}

-	

-	public void setDefaultSpan() {

-		spanHorizontalAlignment= GridData.FILL;

-		spanGrabExcessHorizontalSpace= 1;

-	}

-	

-	public void perform(Control c1) {

-		perform(new Control[] {c1}, 0);

-	}

-	

-	public void perform(Control c1, Control c2, int span) {

-		perform(new Control[] {c1, c2}, span);

-	}

-	

-	public void perform(Control c1, Control c2, Control c3, int span) {

-		perform(new Control[] {c1, c2, c3}, span);

-	}

-	

-	public void perform(Control[] controls, int spanColumn) {

-		int numColumns= numColumns();

-		Assert.isTrue(controls.length <= numColumns);

-		order(controls);

-		int gridIndex= 0;

-		for (int i= 0; i < controls.length; i++) {

-			Control control= controls[i];

-			GridData gd= (GridData)control.getLayoutData();

-			if (gd == null)

-				gd= getGridData(gridIndex);

-				

-			if (i == spanColumn) {

-				int span= numColumns - (controls.length - 1);

-				gridIndex+= span;

-				if (gd == null)

-					gd= new GridData();

-				applyDelta(gd);

-				gd.horizontalSpan= span;

-			} else {

-				gridIndex++;

-			}

-			control.setLayoutData(gd);

-		}

-	}

-	

-	private void applyDelta(GridData gd) {

-		if (spanHorizontalAlignment != -1)

-			gd.horizontalAlignment= spanHorizontalAlignment;

-			

-		if (spanGrabExcessHorizontalSpace != -1) {

-			if (spanGrabExcessHorizontalSpace == 0)

-				gd.grabExcessHorizontalSpace= false;

-			else

-				gd.grabExcessHorizontalSpace= true;

-		}		

-				

-			

-		if (spanHorizontalSpan != -1)

-			gd.horizontalSpan= spanHorizontalSpan;

-			

-		if (spanHorizontalIndent != -1)

-			gd.horizontalIndent= spanHorizontalIndent;

-		

-		if (spanWidthHint != -1)

-			gd.widthHint= spanWidthHint;

-			

-		if (spanVerticalAlignment != -1)

-			gd.verticalAlignment= spanVerticalAlignment;

-			

-		if (spanGrabExcessVerticalSpace != -1) {

-			if (spanGrabExcessVerticalSpace == 0)

-				gd.grabExcessVerticalSpace= false;

-			else

-				gd.grabExcessVerticalSpace= true;

-		}		

-			

-		if (spanVerticalSpan != -1)

-			gd.verticalSpan= spanVerticalSpan;

-			

-		if (spanHeightHint != -1)

-			gd.heightHint= spanHeightHint;

-	}

-	public void setDefaultGridData(GridData gd, int index) {

-		if (index >= fDefaultGridDatas.length) {

-			GridData[] newDatas= new GridData[index + 4];

-			System.arraycopy(fDefaultGridDatas, 0, newDatas, 0, fDefaultGridDatas.length);

-			fDefaultGridDatas= newDatas;

-		}

-		fDefaultGridDatas[index]= gd;

-	}

-	

-	public GridData getGridData(int index) {

-		if (index > fDefaultGridDatas.length)

-			return null;

-			

-		return cloneGridData(fDefaultGridDatas[index]);

-	}

-	

-	public int numColumns() {

-		return fNumColumns;

-	}

-	

-	protected void order(Control[] controls) {

-		if (!fOrder)

-			return;

-			

-		for (int i= 0; i < controls.length; i++) {

-			Control control= controls[i];

-			control.moveBelow(fLastControl);

-			fLastControl= control;

-		}

-	}

-	

-	protected GridData cloneGridData(GridData gd) {

-		if (gd == null)

-			return null;

-			

-		GridData result= new GridData();

-		result.horizontalAlignment= gd.horizontalAlignment;

-		result.grabExcessHorizontalSpace= gd.grabExcessHorizontalSpace;

-		result.horizontalSpan= gd.horizontalSpan;

-		result.horizontalIndent= gd.horizontalIndent;

-		result.widthHint= gd.widthHint;

-		

-		result.verticalAlignment= gd.verticalAlignment;

-		result.grabExcessVerticalSpace= gd.grabExcessVerticalSpace;

-		result.verticalSpan= gd.verticalSpan;

-		result.heightHint= gd.heightHint;

-		return result;

-	}

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
deleted file mode 100644
index 982d8d1..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.jface.text.Position;

-

-public class StringMatcher {

-	protected String fPattern;

-	protected int fLength; // pattern length

-	protected boolean fIgnoreWildCards;

-	protected boolean fIgnoreCase;

-	protected boolean fHasLeadingStar;

-	protected boolean fHasTrailingStar;

-	protected String fSegments[]; //the given pattern is split into * separated segments

-

-	/* boundary value beyond which we don't need to search in the text */

-	protected int fBound= 0;

-

-	protected static final char fSingleWildCard= '\u0000';

-

-	public static class Position {

-		int start; //inclusive

-		int end; //exclusive

-		public Position(int start, int end) {

-			this.start= start;

-			this.end= end;

-		}

-		public int getStart() {

-			return start;

-		}

-		public int getEnd() {

-			return end;

-		}

-	}

-

-	/**

-	 * StringMatcher constructor takes in a String object that is a simple 

-	 * pattern which may contain ‘*’ for 0 and many characters and

-	 * ‘?’ for exactly one character. Also takes as parameter a boolean object

-	 * specifying if case should be ignored

-	 * @deprecated Use StringMatcher(pattern, ignoreCase, ignoreWildCards).

-	 */

-	public StringMatcher(String aPattern, boolean ignoreCase) {

-		this(aPattern, ignoreCase, false);

-	}

-

-	/**

-	 * StringMatcher constructor takes in a String object that is a simple 

-	 * pattern which may contain ‘*’ for 0 and many characters and

-	 * ‘?’ for exactly one character.  

-	 *

-	 * Literal '*' and '?' characters must be escaped in the pattern 

-	 * e.g., "\*" means literal "*", etc.

-	 *

-	 * Escaping any other character (including the escape character itself), 

-	 * just results in that character in the pattern.

-	 * e.g., "\a" means "a" and "\\" means "\"

-	 *

-	 * If invoking the StringMatcher with string literals in Java, don't forget

-	 * escape characters are represented by "\\".

-	 *

-	 * @param aPattern the pattern to match text against

-	 * @param ignoreCase if true, case is ignored

-	 * @param ignoreWildCards if true, wild cards and their escape sequences are ignored

-	 * 		  (everything is taken literally).

-	 */

-	public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {

-		fIgnoreCase= ignoreCase;

-		fIgnoreWildCards= ignoreWildCards;

-		fLength= aPattern.length();

-

-		/* convert case */

-		if (fIgnoreCase) {

-			fPattern= aPattern.toUpperCase();

-		} else {

-			fPattern= aPattern;

-		}

-

-		if (fIgnoreWildCards) {

-			parseNoWildCards();

-		} else {

-			parseWildCards();

-		}

-	}

-

-	/**

-	 * Find the first occurrence of the pattern between <code>start</code)(inclusive) 

-	 * and <code>end</code>(exclusive).  

-	 * @param <code>text</code>, the String object to search in 

-	 * @param <code>start</code>, the starting index of the search range, inclusive

-	 * @param <code>end</code>, the ending index of the search range, exclusive

-	 * @return an <code>StringMatcher.Position</code> object that keeps the starting 

-	 * (inclusive) and ending positions (exclusive) of the first occurrence of the 

-	 * pattern in the specified range of the text; return null if not found or subtext

-	 * is empty (start==end). A pair of zeros is returned if pattern is empty string

-	 * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"

-	 * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned

-	 */

-

-	public StringMatcher.Position find(String text, int start, int end) {

-		if (fPattern == null || text == null)

-			throw new IllegalArgumentException();

-

-		int tlen= text.length();

-		if (start < 0)

-			start= 0;

-		if (end > tlen)

-			end= tlen;

-		if (end < 0 || start >= end)

-			return null;

-		if (fLength == 0)

-			return new Position(start, start);

-		if (fIgnoreWildCards) {

-			int x= posIn(text, start, end);

-			if (x < 0)

-				return null;

-			return new Position(x, x + fLength);

-		}

-

-		int segCount= fSegments.length;

-		if (segCount == 0) //pattern contains only '*'(s)

-			return new Position(start, end);

-

-		int curPos= start;

-		int matchStart= -1;

-		for (int i= 0; i < segCount && curPos < end; ++i) {

-			String current= fSegments[i];

-			int nextMatch= regExpPosIn(text, curPos, end, current);

-			if (nextMatch < 0)

-				return null;

-			if (i == 0)

-				matchStart= nextMatch;

-			curPos= nextMatch + current.length();

-		}

-		return new Position(matchStart, curPos);

-	}

-

-	/**

-	 * match the given <code>text</code> with the pattern 

-	 * @return true if matched eitherwise false

-	 * @param <code>text</code>, a String object 

-	 */

-	public boolean match(String text) {

-		return match(text, 0, text.length());

-	}

-

-	/**

-	 * Given the starting (inclusive) and the ending (exclusive) poisitions in the   

-	 * <code>text</code>, determine if the given substring matches with aPattern  

-	 * @return true if the specified portion of the text matches the pattern

-	 * @param String <code>text</code>, a String object that contains the substring to match 

-	 * @param int <code>start</code> marks the starting position (inclusive) of the substring

-	 * @param int <code>end</code> marks the ending index (exclusive) of the substring 

-	 */

-	public boolean match(String text, int start, int end) {

-		if (null == fPattern || null == text)

-			throw new IllegalArgumentException();

-

-		if (start > end)

-			return false;

-

-		if (fIgnoreWildCards)

-			return fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);

-		int segCount= fSegments.length;

-		if (segCount == 0) //pattern contains only '*'(s) or empty pattern

-			return true;

-		if (start == end)

-			return fLength == 0;

-		if (fLength == 0)

-			return start == end;

-

-		int tlen= text.length();

-		if (start < 0)

-			start= 0;

-		if (end > tlen)

-			end= tlen;

-

-		int tCurPos= start;

-		int bound= end - fBound;

-		if (bound < 0)

-			return false;

-		int i= 0;

-		String current= fSegments[i];

-		int segLength= current.length();

-

-		/* process first segment */

-		if (!fHasLeadingStar) {

-			if (!regExpRegionMatches(text, start, current, 0, segLength)) {

-				return false;

-			} else {

-				++i;

-				tCurPos= tCurPos + segLength;

-			}

-		}

-

-		/* process middle segments */

-		for (; i < segCount && tCurPos <= bound; ++i) {

-			current= fSegments[i];

-			int currentMatch;

-			int k= current.indexOf(fSingleWildCard);

-			if (k < 0) {

-				currentMatch= textPosIn(text, tCurPos, end, current);

-				if (currentMatch < 0)

-					return false;

-			} else {

-				currentMatch= regExpPosIn(text, tCurPos, end, current);

-				if (currentMatch < 0)

-					return false;

-			}

-			tCurPos= currentMatch + current.length();

-		}

-

-		/* process final segment */

-		if (!fHasTrailingStar && tCurPos != end) {

-			int clen= current.length();

-			return regExpRegionMatches(text, end - clen, current, 0, clen);

-		}

-		return i == segCount;

-	}

-

-	/**

-	 * This method parses the given pattern into segments seperated by wildcard '*' characters.

-	 * Since wildcards are not being used in this case, the pattern consists of a single segment.

-	 */

-	private void parseNoWildCards() {

-		fSegments= new String[1];

-		fSegments[0]= fPattern;

-		fBound= fLength;

-	}

-

-	/**

-	 *  This method parses the given pattern into segments seperated by wildcard '*' characters.

-	 * @param p, a String object that is a simple regular expression with ‘*’ and/or ‘?’

-	 */

-	private void parseWildCards() {

-		if (fPattern.startsWith("*")) //$NON-NLS-1$

-			fHasLeadingStar= true;

-		if (fPattern.endsWith("*")) { //$NON-NLS-1$

-			/* make sure it's not an escaped wildcard */

-			if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {

-				fHasTrailingStar= true;

-			}

-		}

-

-		List temp= new ArrayList();

-

-		int pos= 0;

-		StringBuffer buf= new StringBuffer();

-		while (pos < fLength) {

-			char c= fPattern.charAt(pos++);

-			switch (c) {

-				case '\\' :

-					if (pos >= fLength) {

-						buf.append(c);

-					} else {

-						char next= fPattern.charAt(pos++);

-						/* if it's an escape sequence */

-						if (next == '*' || next == '?' || next == '\\') {

-							buf.append(next);

-						} else {

-							/* not an escape sequence, just insert literally */

-							buf.append(c);

-							buf.append(next);

-						}

-					}

-					break;

-				case '*' :

-					if (buf.length() > 0) {

-						/* new segment */

-						temp.add(buf.toString());

-						fBound += buf.length();

-						buf.setLength(0);

-					}

-					break;

-				case '?' :

-					/* append special character representing single match wildcard */

-					buf.append(fSingleWildCard);

-					break;

-				default :

-					buf.append(c);

-			}

-		}

-

-		/* add last buffer to segment list */

-		if (buf.length() > 0) {

-			temp.add(buf.toString());

-			fBound += buf.length();

-		}

-

-		fSegments= (String[])temp.toArray(new String[temp.size()]);

-	}

-

-	/** 

-	 * @param <code>text</code>, a string which contains no wildcard

-	 * @param <code>start</code>, the starting index in the text for search, inclusive

-	 * @param <code>end</code>, the stopping point of search, exclusive

-	 * @return the starting index in the text of the pattern , or -1 if not found 

-	 */

-	protected int posIn(String text, int start, int end) { //no wild card in pattern

-		int max= end - fLength;

-

-		if (!fIgnoreCase) {

-			int i= text.indexOf(fPattern, start);

-			if (i == -1 || i > max)

-				return -1;

-			return i;

-		}

-

-		for (int i= start; i <= max; ++i) {

-			if (text.regionMatches(true, i, fPattern, 0, fLength))

-				return i;

-		}

-

-		return -1;

-	}

-

-	/** 

-	 * @param <code>text</code>, a simple regular expression that may only contain '?'(s)

-	 * @param <code>start</code>, the starting index in the text for search, inclusive

-	 * @param <code>end</code>, the stopping point of search, exclusive

-	 * @param <code>p</code>, a simple regular expression that may contains '?'

-	 * @param <code>caseIgnored</code>, wether the pattern is not casesensitive

-	 * @return the starting index in the text of the pattern , or -1 if not found 

-	 */

-	protected int regExpPosIn(String text, int start, int end, String p) {

-		int plen= p.length();

-

-		int max= end - plen;

-		for (int i= start; i <= max; ++i) {

-			if (regExpRegionMatches(text, i, p, 0, plen))

-				return i;

-		}

-		return -1;

-	}

-

-	/**

-	 * 

-	 * @return boolean

-	 * @param <code>text</code>, a String to match

-	 * @param <code>start</code>, int that indicates the starting index of match, inclusive

-	 * @param <code>end</code> int that indicates the ending index of match, exclusive

-	 * @param <code>p</code>, String,  String, a simple regular expression that may contain '?'

-	 * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive

-	 */

-	protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {

-		while (plen-- > 0) {

-			char tchar= text.charAt(tStart++);

-			char pchar= p.charAt(pStart++);

-

-			/* process wild cards */

-			if (!fIgnoreWildCards) {

-				/* skip single wild cards */

-				if (pchar == fSingleWildCard) {

-					continue;

-				}

-			}

-			if (pchar == tchar)

-				continue;

-			if (fIgnoreCase) {

-				char tc= Character.toUpperCase(tchar);

-				if (tc == pchar)

-					continue;

-			}

-			return false;

-		}

-		return true;

-	}

-

-	/** 

-	 * @param <code>text</code>, the string to match

-	 * @param <code>start</code>, the starting index in the text for search, inclusive

-	 * @param <code>end</code>, the stopping point of search, exclusive

-	 * @param code>p</code>, a string that has no wildcard

-	 * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive

-	 * @return the starting index in the text of the pattern , or -1 if not found 

-	 */

-	protected int textPosIn(String text, int start, int end, String p) {

-

-		int plen= p.length();

-		int max= end - plen;

-

-		if (!fIgnoreCase) {

-			int i= text.indexOf(p, start);

-			if (i == -1 || i > max)

-				return -1;

-			return i;

-		}

-

-		for (int i= 0; i <= max; ++i) {

-			if (text.regionMatches(true, i, p, 0, plen))

-				return i;

-		}

-

-		return -1;

-	}

-

-}

-

-

diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/TypeFilteringDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/TypeFilteringDialog.java
deleted file mode 100644
index c4e6197..0000000
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/TypeFilteringDialog.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.internal.ui.util;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Iterator;

-import java.util.List;

-import java.util.StringTokenizer;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Text;

-

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.jface.viewers.CheckboxTableViewer;

-

-import org.eclipse.ui.IFileEditorMapping;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.dialogs.FileEditorMappingContentProvider;

-import org.eclipse.ui.dialogs.FileEditorMappingLabelProvider;

-import org.eclipse.ui.dialogs.SelectionDialog;

-import org.eclipse.ui.help.WorkbenchHelp;

-

-import org.eclipse.search.internal.ui.ISearchHelpContextIds;

-import org.eclipse.search.internal.ui.SearchMessages;

-

-/**

- * The TypeFilteringDialog is a SelectionDialog that allows the user to select a file editor.

- * XXX: Workbench should offer this dialog (public API), see: 1GIYHMY: ITPUI:WINNT - DCR: TypeFilteringDialog should be public API

- */

-public class TypeFilteringDialog extends SelectionDialog {

-	private Button fAddTypesButton;

-

-	private Collection fInitialSelections;

-

-	// the visual selection widget group

-	private CheckboxTableViewer fListViewer;

-

-	// sizing constants

-	private final static int SIZING_SELECTION_WIDGET_HEIGHT= 250;

-	private final static int SIZING_SELECTION_WIDGET_WIDTH= 300;

-

-	private Text fUserDefinedText;

-

-	private IFileEditorMapping[] fCurrentInput;

-	/**

-	 * Creates a type selection dialog using the supplied entries. Set the initial selections to those

-	 * whose extensions match the preselections.

-	 */

-	public TypeFilteringDialog(Shell parentShell, Collection preselections) {

-		super(parentShell);

-		setTitle(SearchMessages.getString("TypesFiltering.title")); //$NON-NLS-1$

-		fInitialSelections= preselections;

-		setMessage(SearchMessages.getString("TypesFiltering.message")); //$NON-NLS-1$

-	}

-

-	/**

-	 * Add the selection and deselection buttons to the dialog.

-	 * @param composite org.eclipse.swt.widgets.Composite

-	 */

-	private void addSelectionButtons(Composite composite) {

-

-		Composite buttonComposite= new Composite(composite, SWT.RIGHT);

-		GridLayout layout= new GridLayout();

-		layout.numColumns= 2;

-		buttonComposite.setLayout(layout);

-		GridData data =

-			new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);

-		data.grabExcessHorizontalSpace= true;

-		composite.setData(data);

-

-		Button selectButton =

-			createButton(

-				buttonComposite,

-				IDialogConstants.SELECT_ALL_ID,

-				SearchMessages.getString("TypesFiltering.selectAll"), //$NON-NLS-1$

-				false);

-

-		SelectionListener listener= new SelectionAdapter() {

-			public void widgetSelected(SelectionEvent e) {

-				fListViewer.setAllChecked(true);

-			}

-		};

-		selectButton.addSelectionListener(listener);

-

-		Button deselectButton =

-			createButton(

-				buttonComposite,

-				IDialogConstants.DESELECT_ALL_ID,

-				SearchMessages.getString("TypesFiltering.deselectAll"), //$NON-NLS-1$

-				false);

-

-		listener= new SelectionAdapter() {

-			public void widgetSelected(SelectionEvent e) {

-				fListViewer.setAllChecked(false);

-

-			}

-		};

-		deselectButton.addSelectionListener(listener);

-

-	}

-

-	/**

-	 * Add the currently-specified extensions.

-	 */

-	private void addUserDefinedEntries(List result) {

-

-		StringTokenizer tokenizer =

-			new StringTokenizer(fUserDefinedText.getText(), FileTypeEditor.TYPE_DELIMITER);

-

-		//Allow the *. and . prefix and strip out the extension

-		while (tokenizer.hasMoreTokens()) {

-			String currentExtension= tokenizer.nextToken().trim();

-			if (!currentExtension.equals("")) //$NON-NLS-1$

-				result.add(currentExtension);

-		}

-	}

-

-	/**

-	 * Visually checks the previously-specified elements in this dialog's list 

-	 * viewer.

-	 */

-	private void checkInitialSelections() {

-

-		IFileEditorMapping editorMappings[] =

-			PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();

-		ArrayList selectedMappings= new ArrayList();

-

-		for (int i= 0; i < editorMappings.length; i++) {

-			IFileEditorMapping mapping= editorMappings[i];

-			if (fInitialSelections.contains(mapping.getLabel())) {

-				fListViewer.setChecked(mapping, true);

-				selectedMappings.add(mapping.getLabel());

-			}

-		}

-

-		//Now add in the ones not selected to the user defined list

-		Iterator initialIterator= fInitialSelections.iterator();

-		StringBuffer entries= new StringBuffer();

-		boolean first= true;

-		while (initialIterator.hasNext()) {

-			String nextExtension= (String)initialIterator.next();

-			if (!selectedMappings.contains(nextExtension)) {

-				if (!first) {

-					entries.append(FileTypeEditor.TYPE_DELIMITER);

-					entries.append(" "); //$NON-NLS-1$

-				}

-				first= false;

-				entries.append(nextExtension);

-			}

-		}

-		fUserDefinedText.setText(entries.toString());

-	}

-

-	/* (non-Javadoc)

-	 * Method declared in Window.

-	 */

-	protected void configureShell(Shell shell) {

-		super.configureShell(shell);

-		WorkbenchHelp.setHelp(

-			shell,

-			new Object[] { ISearchHelpContextIds.TYPE_FILTERING_DIALOG });

-	}

-

-	/* (non-Javadoc)

-	 * Method declared on Dialog.

-	 */

-	protected Control createDialogArea(Composite parent) {

-		// page group

-		Composite composite= (Composite)super.createDialogArea(parent);

-

-		createMessageArea(composite);

-

-		fListViewer= new CheckboxTableViewer(composite, SWT.BORDER);

-		GridData data= new GridData(GridData.FILL_BOTH);

-		data.heightHint= SIZING_SELECTION_WIDGET_HEIGHT;

-		data.widthHint= SIZING_SELECTION_WIDGET_WIDTH;

-		fListViewer.getTable().setLayoutData(data);

-

-		fListViewer.setLabelProvider(FileEditorMappingLabelProvider.INSTANCE);

-		fListViewer.setContentProvider(FileEditorMappingContentProvider.INSTANCE);

-

-		addSelectionButtons(composite);

-

-		createUserEntryGroup(composite);

-

-		initializeViewer();

-

-		// initialize page

-		if (fInitialSelections != null && !fInitialSelections.isEmpty())

-			checkInitialSelections();

-

-		return composite;

-	}

-

-	/**

-	 * Create the group that shows the user defined entries for the dialog.

-	 * @param parent the parent this is being created in.

-	 */

-	private void createUserEntryGroup(Composite parent) {

-

-		// destination specification group

-		Composite userDefinedGroup= new Composite(parent, SWT.NONE);

-		GridLayout layout= new GridLayout();

-		layout.numColumns= 2;

-		userDefinedGroup.setLayout(layout);

-		userDefinedGroup.setLayoutData(

-			new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));

-

-		new Label(userDefinedGroup, SWT.NONE).setText(

-			SearchMessages.getString("TypesFiltering.otherExtensions")); //$NON-NLS-1$

-

-		// user defined entry field

-		fUserDefinedText= new Text(userDefinedGroup, SWT.SINGLE | SWT.BORDER);

-		GridData data =

-			new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);

-		fUserDefinedText.setLayoutData(data);

-	}

-

-	/**

-	 * Return the input to the dialog.

-	 */

-	private IFileEditorMapping[] getInput() {

-

-		//Filter the mappings to be just those with a wildcard extension

-		if (fCurrentInput == null) {

-			List wildcardEditors= new ArrayList();

-			IFileEditorMapping[] allMappings =

-				PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();

-			for (int i= 0; i < allMappings.length; i++) {

-				if (allMappings[i].getName().equals("*")) //$NON-NLS-1$

-					wildcardEditors.add(allMappings[i]);

-			}

-			fCurrentInput= new IFileEditorMapping[wildcardEditors.size()];

-			wildcardEditors.toArray(fCurrentInput);

-		}

-

-		return fCurrentInput;

-	}

-

-	/**

-	 * Initializes this dialog's viewer after it has been laid out.

-	 */

-	private void initializeViewer() {

-		fListViewer.setInput(getInput());

-	}

-

-	/**

-	 * The <code>ListSelectionDialog</code> implementation of this 

-	 * <code>Dialog</code> method builds a list of the selected elements for later

-	 * retrieval by the client and closes this dialog.

-	 */

-	protected void okPressed() {

-

-		// Get the input children.

-		IFileEditorMapping[] children= getInput();

-

-		List list= new ArrayList();

-

-		// Build a list of selected children.

-		for (int i= 0; i < children.length; ++i) {

-			IFileEditorMapping element= children[i];

-			if (fListViewer.getChecked(element))

-				list.add(element.getLabel());

-		}

-

-		addUserDefinedEntries(list);

-		setResult(list);

-		super.okPressed();

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/ui/IContextMenuContributor.java b/org.eclipse.search/search/org/eclipse/search/ui/IContextMenuContributor.java
deleted file mode 100644
index 5c6efe5..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/IContextMenuContributor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.jface.action.IMenuManager;

-import org.eclipse.jface.viewers.IInputSelectionProvider;

-

-/**

- * Specify how clients can add menu items

- * to the context menu of the search result view.

- * A class that contributes context menu items

- * must implement this interface and pass an

- * instance of itself to the search result view.

- * 

- * @see	ISearchResultView#searchStarted

- */

-public interface IContextMenuContributor {

-	/**

-	 * Contributes menu items to the given context menu appropriate for the

-	 * given selection.

-	 *

-	 * @param menu		the menu to which the items are added

-	 * @param inputProvider	the selection and input provider

-	 */

-	public void fill(IMenuManager menu, IInputSelectionProvider inputProvider);

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/ui/IGroupByKeyComputer.java b/org.eclipse.search/search/org/eclipse/search/ui/IGroupByKeyComputer.java
deleted file mode 100644
index f31523b..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/IGroupByKeyComputer.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.core.resources.IMarker;

-

-/**

- * Computes the key by which the markers in the search result view

- * are grouped.

- */

-public interface IGroupByKeyComputer {

-	/**

-	 * Computes and returns key by which the given marker is grouped.

-	 *

-	 * @param	marker	the marker for which the key must be computed

-	 * @return	an object that will be used as the key for that marker

-	 *		<code>UNKNOWN</code> if this computer cannot decide

-	 */

-	public Object computeGroupByKey(IMarker marker);

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPage.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchPage.java
deleted file mode 100644
index ee05bb5..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPage.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.jface.dialogs.IDialogPage;

-

-/**

- * Defines a page inside the search dialog.

- * Clients can contribute their own search page to the

- * dialog by implementing this interface, typically as a subclass

- * of <code>DialogPage</code>.

- * <p>

- * The search dialog calls the <code>performAction</code> method when the Search

- * button is pressed.

- * <p>

- *

- * @see org.eclipse.jface.dialogs.IDialogPage

- * @see org.eclipse.jface.dialogs.DialogPage

- */

-public interface ISearchPage extends IDialogPage {

-	/**

-	 * Performs the action for this page.

-	 * The search dialog calls this method when the Search

-	 * button is pressed.

-	 *

-	 * @return <code>true</code> if the dialog can be closed after execution

-	 */

-	public boolean performAction();

-	/**

-	 * Sets the container of this page.

-	 * The search dialog calls this method to initialize this page.

-	 * Implementations may store the reference to the container.

-	 *

-	 * @param	container	the container for this page

-	 */

-	public void setContainer(ISearchPageContainer container);

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageContainer.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageContainer.java
deleted file mode 100644
index c67db4e..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageContainer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.jface.operation.IRunnableContext;

-import org.eclipse.jface.viewers.ISelection;

-

-/**

- * Offers client access to the search dialog.

- * A search page can enable or disable the dialog's action

- * button and get an operation context to perform the action.

- * The dialog itself cannot be accessed directly.

- * <p>

- * This interface is not intended to be implemented by clients.

- * </p>

- */

-public interface ISearchPageContainer {

-	/**

-	 * Returns the selection with which this container was opened.

-	 *

-	 * @return the selection passed to this container when it was opened

-	 */

-	public ISelection getSelection(); 

-	/**

-	 * Returns the context for the search operation.

-	 * This context allows progress to be shown inside the search dialog.

-	 *

-	 * @return	the <code>IRunnableContext</code> for the search operation

-	 */

-	public IRunnableContext getRunnableContext();

-	/**

-	 * Sets the enable state of the perform action button

-	 * of this container.

-	 *

-	 * @param	state	<code>true</code> to enable the button which performs the action

-	 */

-	 public void setPerformActionEnabled(boolean state);

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageScoreComputer.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageScoreComputer.java
deleted file mode 100644
index 2a93f2b..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchPageScoreComputer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-/**

- * Computes a score that is used by the search dialog

- * to find the best fitting page for a selection when opened.

- * The score has no upper limit but must be at least

- * <code>LOWEST</code>. Higher values means the page is better

- * suited for the given selection input.

- * <p>

- * For example, a Java-specific search page score computer could test

- * if the page is a Java search page and returns high scores

- * for Java elements as selection input.

- * </p>

- */

-public interface ISearchPageScoreComputer {

-	/**

-	 * Invalid score value indicating a score is unknown or undecided.

-	 */

-	public static final int UNKNOWN= -1;

-	/**

-	 * Lowest possible valid score.

-	 */

-	public static final int LOWEST= 0;

-	/**

-	 * Computes and returns a score indicating how good the page with the given

-	 * id can handle the given input element.

-	 * The search page id appears as the <code>id</code> attribute of the

-	 * <code>&lt;page&gt;</code> element contributed to the

-	 * search pages extension point (<code>"org.eclipse.search.searchPages"</code>).

-	 *

-	 * @param	pageId	the string id of the page for which the score is computed

-	 * @param	input		the object based on which the page should open

-	 * @return	a score higher or equal to <code>LOWEST</code>, or

-	 *		<code>UNKNOWN</code> if this computer cannot decide

-	 */

-	public int computeScore(String pageId, Object input);

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
deleted file mode 100644
index 06560d9..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.operation.IRunnableWithProgress;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.ISelection;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.ui.IViewPart;

-

-/**

- * Provides client access to the search result view.

- * Each element in the view is a <code>ISearchResultViewEntry</code>,

- * which groups markers based on the <code>groupByKey</code> provided

- * by the client each time when adding a match. If every match should

- * show up in the search result view then the match itself can be used

- * as key.

- * <p>

- * The search result view has id <code>"org.eclipse.search.SearchResultView"</code>.

- * </p>

- * <p>

- * This interface is not intended to be implemented by clients.

- * </p>

- */

-public interface ISearchResultView extends IViewPart {

-	/**

-	 * Returns the current selection of the search result view

-	 *

-	 * @return	the current selection of the search result view

-	 * @see	org.eclipse.jface.viewers.ISelectionProvider#getSelection

-	 */

-	public ISelection getSelection();

-	/**

-	 * Informs the view that a search has started.

-	 * Provides all necessary information to create an entry in the search result 

-	 * view.

-	 * If every match should show up in the search result view then the match

-	 * itself can be used as key.	 

-	 *

-	 * @param	pageId			the id of the search page which started the search

- 	 * @param	label				the label to be used for this search occurrence

- 	 * @param	imageDescriptor		the image descriptor to be used for this search occurrence,

- 	 *						or <code>null</code> if this search should not have an image

- 	 * @param	contributor			the context menu contributor

-  	 *						or <code>null</code> if no context menu is contributed

-	 * @param	labelProvider		the label provider used by this search result view

-  	 *						or <code>null</code> if the default provider should be used.

-	 *						The default label provider shows the resource name and the corresponding image.

-	 * @param	gotoAction			the action used by the view to go to a marker

-	 * @param	groupByKeyComputer	the computer used by the view to compute the key for a marker

-	 * @param	operation			the runnable used by the view to repeat the search

-	 */

-	public void searchStarted(

-				String			pageId,

-				String			label,

-				ImageDescriptor		imageDescriptor,

-				IContextMenuContributor contributor,

-				ILabelProvider		labelProvider,

-				IAction			gotoAction,

-				IGroupByKeyComputer	groupByKeyComputer,

-				IRunnableWithProgress	operation);

-	/**

-	 * Informs the view that the search has finished.

-	 * This method must also be called in case of the search

-	 * fails or has been canceled.

-	 */

-	public void searchFinished();

-	/**

-	 * Informs the view that a match has been found.

-	 * Provides all necessary information to create a search result entry in this

-	 * view.

-	 * <p>

-	 * Note: It is the clients responsibility to create the marker for this match.

-	 * </p>

-	 *

-	 * @param	description		the text description of the match

-	 * @param	groupByKey		the <code>Object</code> by which this match is grouped

- 	 * @param	marker		the marker for this match

-	 * @param	resource		the marker's resource passed for optimization

-	 */

-	public void addMatch(String description, Object groupByKey, IResource resource, IMarker marker);

-}
\ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultViewEntry.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultViewEntry.java
deleted file mode 100644
index 3960623..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultViewEntry.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IResource;

-

-/**

- * Specifies a search result view entry.

- * This entry provides information about the markers

- * it groups by a client defined key. Each entry in the search

- * result view corresponds to a different key.

- * <p>

- * The UI allows stepping through this entry's markers grouped by the key.

- * </p>

- * <p>

- * This interface is not intended to be implemented by clients.

- * </p>

- */

-public interface ISearchResultViewEntry {

-	/**

-	 * Returns the key by which this entry's markers

-	 * are logically grouped. A line in a text could be such a key.

-	 * Clients supply this key as a parameter to <code>ISearchResultView.addMatch</code>.

-	 *

-	 * @return	the common resource of this entry's markers

-	 * @see	ISearchResultView#addMatch

-	 */

-	public Object getGroupByKey();

-	/**

-	 * Returns the resource to which this entry's markers are attached.

-	 * This is a convenience method for <code>getSelectedMarker().getResource()</code>.

-	 *

-	 * @return	the common resource of this entry's markers

-	 */

-	public IResource getResource();

-	/**

-	 * Returns the number of markers grouped by this entry.

-	 *

-	 * @return	the number of markers

-	 */	

-	public int getMatchCount();

-	/**

-	 * Returns the selected marker of this entry, or the first one

-	 * if no marker is selected.

-	 * A search results view entry can group markers

-	 * which the UI allows the user to step through them while

-	 * this entry remains selected.

-	 *

-	 * @return	the selected marker inside this entry, or

-	 *		<code>null</code> if the entry has no markers

-	 */	

-	public IMarker getSelectedMarker();

-}

-

diff --git a/org.eclipse.search/search/org/eclipse/search/ui/SearchUI.java b/org.eclipse.search/search/org/eclipse/search/ui/SearchUI.java
deleted file mode 100644
index ec26839..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/SearchUI.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * (c) Copyright IBM Corp. 2000, 2001.

- * All Rights Reserved.

- */

-package org.eclipse.search.ui;

-

-import org.eclipse.swt.graphics.Image;

-

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search.internal.ui.SearchPluginImages;

-

-/**

- * The central class for access to the Search Plug-in's User Interface. 

- * This class cannot be instantiated; all functionality is provided by 

- * static methods.

- * 

- * Features provided:

- * <ul>

- * <li>convenient access to the search result view of the active workbench

- *   window.</li>

- * </ul>

- * <p>

- *

- * @see ISearchResultView

- */

-public final class SearchUI {

-	/**

-	 * Search Plug-in Id (value <code>"org.eclipse.search"</code>).

-	 */

-	public static final String PLUGIN_ID= "org.eclipse.search"; //$NON-NLS-1$

-	/** 

-	 * Search marker type (value <code>"org.eclipse.search.searchmarker"</code>).

-	 *

-	 * @see org.eclipse.core.resources.IMarker

-	 */ 

-	public static final String SEARCH_MARKER=  PLUGIN_ID + ".searchmarker"; //$NON-NLS-1$

-	/** 

-	 * Line marker attribute (value <code>"line"</code>)

-	 * The value of the marker attribute is the line which contains the text search match.

-	 *

-	 * @see org.eclipse.core.resources.IMarker#getAttribute

-	 */

-	public static final String LINE= "line"; //$NON-NLS-1$

-	/** 

-	 * Id of the search result view

-	 * (value <code>"org.eclipse.search.SearchResultView"</code>).

-	 */

-	public static final String SEARCH_RESULT_VIEW_ID= PLUGIN_ID + ".SearchResultView"; //$NON-NLS-1$

-	/**

-	 * Activates the search result view in the active page of the

-	 * active workbench window. This call has no effect (but returns <code>true</code>

-	 * if the search result view is already activated.

-	 *

-	 * @return <code>true</code> if the search result view could be activated

-	 */

-	public static boolean activateSearchResultView() {

-		return SearchPlugin.activateSearchResultView();	

-	}		

-	/**

-	 * Returns the search result view of the active page of the

-	 * active workbench window.

-	 *

-	 * @return	the search result view or <code>null</code>

-	 * 		if there is no active search result view

-	 */

-	public static ISearchResultView getSearchResultView() {

-		return SearchPlugin.getSearchResultView();	

-	}

-	/**

-	 * Returns the shared search marker image.

-	 * Normally, editors show this icon in their vertical ruler.

-	 * This image is owned by the search UI plug-in and must not be disposed

-	 * by clients.

-	 *

-	 * @return the shared image

-	 */

-	public static Image getSearchMarkerImage() {

-		return SearchPluginImages.get(SearchPluginImages.IMG_OBJ_SEARCHMARKER);

-	}

-

-	/**

-	 * Block instantiation.

-	 */

-	private SearchUI() {

-	}

-}

diff --git a/org.eclipse.search/search/org/eclipse/search/ui/package.html b/org.eclipse.search/search/org/eclipse/search/ui/package.html
deleted file mode 100644
index 406d2d5..0000000
--- a/org.eclipse.search/search/org/eclipse/search/ui/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!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="Author" content="IBM">

-   <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">

-   <title>Package-level Javadoc</title>

-</head>

-<body>

-Provides classes and interfaces for search pages.

-New search dialog pages can be contributed via a plug-in extension point.

-This package provides the interfaces and classes to implement these dialog

-pages and offers hooks to populate the search result view.

-<h2>

-Package Specification</h2>

-Each search dialog page must implement <tt>ISearchPage</tt>. A search page

-has access to its container (<tt>ISearchPageContainer</tt>) to modify search

-dialog properties. The class <tt>SearchUI</tt> can activate the search

-results view and provide access to the active search results view (<tt>ISearchResultView</tt>).

-<p>It is the clients responsibility to create a marker for each match and

-then report the match to the search result view together with a key (<tt>groupByKey</tt>).

-Each key corresponds to a search result view entry (<tt>ISearchResultViewEntry</tt>)

-which allows to step through the markers grouped by the key.

-</body>

-</html>

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaActionContributor.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaActionContributor.java
new file mode 100644
index 0000000..b01f739
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaActionContributor.java
@@ -0,0 +1,76 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ResourceBundle;

+import org.eclipse.jface.action.IMenuManager;

+import org.eclipse.jface.action.IToolBarManager;

+import org.eclipse.jface.action.Separator;

+import org.eclipse.ui.IEditorPart;

+import org.eclipse.ui.IWorkbenchActionConstants;

+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;

+import org.eclipse.ui.texteditor.ITextEditor;

+import org.eclipse.ui.texteditor.RetargetTextEditorAction;

+import org.eclipse.ui.texteditor.TextEditorAction;

+

+/**

+ * Contributes interesting Java actions to the desktop's Edit menu and

+ * the toolbar.

+ */

+public class JavaActionContributor extends BasicTextEditorActionContributor {

+

+	protected RetargetTextEditorAction fContentAssistProposal;

+	protected RetargetTextEditorAction fContentAssistTip;

+	protected TextEditorAction fTogglePresentation;

+

+	/**

+	 * Default constructor.

+	 */

+	public JavaActionContributor() {

+		super();

+

+		fContentAssistProposal= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal."); //$NON-NLS-1$

+		fContentAssistTip= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistTip."); //$NON-NLS-1$

+		fTogglePresentation= new PresentationAction();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on EditorActionBarContributor

+	 */

+	public void contributeToMenu(IMenuManager menuManager) {

+		IMenuManager editMenu= menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);

+		if (editMenu != null) {

+			editMenu.add(new Separator());

+			editMenu.add(fContentAssistProposal);

+			editMenu.add(fContentAssistTip);

+		}

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on EditorActionBarContributor

+	 */

+	public void contributeToToolBar(IToolBarManager toolBarManager) {

+		toolBarManager.add(new Separator());

+		toolBarManager.add(fTogglePresentation);

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on EditorActionBarContributor

+	 */

+	public void setActiveEditor(IEditorPart part) {

+		super.setActiveEditor(part);

+

+		ITextEditor editor= null;

+		if (part instanceof ITextEditor)

+			editor= (ITextEditor) part;

+

+		fContentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); //$NON-NLS-1$

+		fContentAssistTip.setAction(getAction(editor, "ContentAssistTip")); //$NON-NLS-1$

+

+		fTogglePresentation.setEditor(editor);

+		fTogglePresentation.update();

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaAnnotationHover.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaAnnotationHover.java
new file mode 100644
index 0000000..676e485
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaAnnotationHover.java
@@ -0,0 +1,34 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.IRegion;

+import org.eclipse.jface.text.source.IAnnotationHover;

+import org.eclipse.jface.text.source.ISourceViewer;

+

+/** 

+ * The JavaAnnotationHover provides the hover support for java editors.

+ */

+ 

+public class JavaAnnotationHover implements IAnnotationHover {

+

+	/* (non-Javadoc)

+	 * Method declared on IAnnotationHover

+	 */

+	public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {

+		IDocument document= sourceViewer.getDocument();

+

+		try {

+			IRegion info= document.getLineInformation(lineNumber);

+			return document.get(info.getOffset(), info.getLength());

+		} catch (BadLocationException x) {

+		}

+

+		return null;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaContentOutlinePage.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaContentOutlinePage.java
new file mode 100644
index 0000000..f4f2d46
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaContentOutlinePage.java
@@ -0,0 +1,244 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.text.MessageFormat;

+import java.util.ArrayList;

+import java.util.List;

+

+import org.eclipse.swt.widgets.Composite;

+import org.eclipse.swt.widgets.Control;

+

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.BadPositionCategoryException;

+import org.eclipse.jface.text.DefaultPositionUpdater;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.IPositionUpdater;

+import org.eclipse.jface.text.Position;

+import org.eclipse.jface.viewers.ISelection;

+import org.eclipse.jface.viewers.IStructuredSelection;

+import org.eclipse.jface.viewers.ITreeContentProvider;

+import org.eclipse.jface.viewers.LabelProvider;

+import org.eclipse.jface.viewers.SelectionChangedEvent;

+import org.eclipse.jface.viewers.TreeViewer;

+import org.eclipse.jface.viewers.Viewer;

+

+import org.eclipse.ui.texteditor.IDocumentProvider;

+import org.eclipse.ui.texteditor.ITextEditor;

+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;

+

+/**

+ * A content outline page which always represents the content of the

+ * connected editor in 10 segments.

+ */

+public class JavaContentOutlinePage extends ContentOutlinePage {

+

+	/**

+	 * A segment element.

+	 */

+	protected static class Segment {

+		public String name;

+		public Position position;

+

+		public Segment(String name, Position position) {

+			this.name= name;

+			this.position= position;

+		}

+

+		public String toString() {

+			return name;

+		}

+	};

+

+	/**

+	 * Divides the editor's document into ten segments and provides elements for them.

+	 */

+	protected class ContentProvider implements ITreeContentProvider {

+

+		protected final static String SEGMENTS= "__java_segments"; //$NON-NLS-1$

+		protected IPositionUpdater fPositionUpdater= new DefaultPositionUpdater(SEGMENTS);

+		protected List fContent= new ArrayList(10);

+

+		protected void parse(IDocument document) {

+

+			int lines= document.getNumberOfLines();

+			int increment= Math.max(Math.round((float) (lines / 10)), 10);

+

+			for (int line= 0; line < lines; line += increment) {

+

+				int length= increment;

+				if (line + increment > lines)

+					length= lines - line;

+

+				try {

+

+					int offset= document.getLineOffset(line);

+					int end= document.getLineOffset(line + length);

+					length= end - offset;

+					Position p= new Position(offset, length);

+					document.addPosition(SEGMENTS, p);

+					fContent.add(new Segment(MessageFormat.format(JavaEditorMessages.getString("OutlinePage.segment.title_pattern"), new Object[] { new Integer(offset) }), p)); //$NON-NLS-1$

+

+				} catch (BadPositionCategoryException x) {

+				} catch (BadLocationException x) {

+				}

+			}

+		}

+

+		/*

+		 * @see IContentProvider#inputChanged(Viewer, Object, Object)

+		 */

+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

+			if (oldInput != null) {

+				IDocument document= fDocumentProvider.getDocument(oldInput);

+				if (document != null) {

+					try {

+						document.removePositionCategory(SEGMENTS);

+					} catch (BadPositionCategoryException x) {

+					}

+					document.removePositionUpdater(fPositionUpdater);

+				}

+			}

+

+			fContent.clear();

+

+			if (newInput != null) {

+				IDocument document= fDocumentProvider.getDocument(newInput);

+				if (document != null) {

+					document.addPositionCategory(SEGMENTS);

+					document.addPositionUpdater(fPositionUpdater);

+

+					parse(document);

+				}

+			}

+		}

+

+		/*

+		 * @see IContentProvider#dispose

+		 */

+		public void dispose() {

+			if (fContent != null) {

+				fContent.clear();

+				fContent= null;

+			}

+		}

+

+		/*

+		 * @see IContentProvider#isDeleted(Object)

+		 */

+		public boolean isDeleted(Object element) {

+			return false;

+		}

+

+		/*

+		 * @see IStructuredContentProvider#getElements(Object)

+		 */

+		public Object[] getElements(Object element) {

+			return fContent.toArray();

+		}

+

+		/*

+		 * @see ITreeContentProvider#hasChildren(Object)

+		 */

+		public boolean hasChildren(Object element) {

+			return element == fInput;

+		}

+

+		/*

+		 * @see ITreeContentProvider#getParent(Object)

+		 */

+		public Object getParent(Object element) {

+			if (element instanceof Segment)

+				return fInput;

+			return null;

+		}

+

+		/*

+		 * @see ITreeContentProvider#getChildren(Object)

+		 */

+		public Object[] getChildren(Object element) {

+			if (element == fInput)

+				return fContent.toArray();

+			return new Object[0];

+		}

+	};

+

+	protected Object fInput;

+	protected IDocumentProvider fDocumentProvider;

+	protected ITextEditor fTextEditor;

+

+	/**

+	 * Creates a content outline page using the given provider and the given editor.

+	 */

+	public JavaContentOutlinePage(IDocumentProvider provider, ITextEditor editor) {

+		super();

+		fDocumentProvider= provider;

+		fTextEditor= editor;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on ContentOutlinePage

+	 */

+	public void createControl(Composite parent) {

+

+		super.createControl(parent);

+

+		TreeViewer viewer= getTreeViewer();

+		viewer.setContentProvider(new ContentProvider());

+		viewer.setLabelProvider(new LabelProvider());

+		viewer.addSelectionChangedListener(this);

+

+		if (fInput != null)

+			viewer.setInput(fInput);

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on ContentOutlinePage

+	 */

+	public void selectionChanged(SelectionChangedEvent event) {

+

+		super.selectionChanged(event);

+

+		ISelection selection= event.getSelection();

+		if (selection.isEmpty())

+			fTextEditor.resetHighlightRange();

+		else {

+			Segment segment= (Segment) ((IStructuredSelection) selection).getFirstElement();

+			int start= segment.position.getOffset();

+			int length= segment.position.getLength();

+			try {

+				fTextEditor.setHighlightRange(start, length, true);

+			} catch (IllegalArgumentException x) {

+				fTextEditor.resetHighlightRange();

+			}

+		}

+	}

+	

+	/**

+	 * Sets the input of the outline page

+	 */

+	public void setInput(Object input) {

+		fInput= input;

+		update();

+	}

+	

+	/**

+	 * Updates the outline page.

+	 */

+	public void update() {

+		TreeViewer viewer= getTreeViewer();

+

+		if (viewer != null) {

+			Control control= viewer.getControl();

+			if (control != null && !control.isDisposed()) {

+				control.setRedraw(false);

+				viewer.setInput(fInput);

+				viewer.expandAll();

+				control.setRedraw(true);

+			}

+		}

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaDocumentProvider.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaDocumentProvider.java
new file mode 100644
index 0000000..f11dfd1
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaDocumentProvider.java
@@ -0,0 +1,57 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.core.runtime.CoreException;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.IDocumentPartitioner;

+import org.eclipse.jface.text.rules.RuleBasedPartitioner;

+import org.eclipse.ui.editors.text.FileDocumentProvider;

+import org.eclipse.ui.examples.javaeditor.java.JavaPartitionScanner;

+

+/** 

+ * The JavaDocumentProvider provides the IDocuments used by java editors.

+ */

+

+public class JavaDocumentProvider extends FileDocumentProvider {

+

+	private final static String[] TYPES= new String[] { JavaPartitionScanner.JAVA_DOC, JavaPartitionScanner.JAVA_MULTILINE_COMMENT };

+

+	private static JavaPartitionScanner fgScanner= null;

+

+	public JavaDocumentProvider() {

+		super();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on AbstractDocumentProvider

+	 */

+	 protected IDocument createDocument(Object element) throws CoreException {

+		IDocument document= super.createDocument(element);

+		if (document != null) {

+			IDocumentPartitioner partitioner= createJavaPartitioner();

+			partitioner.connect(document);

+			document.setDocumentPartitioner(partitioner);

+		}

+		return document;

+	}

+	

+	/**

+	 * Return a paritioner for .java files.

+	 */

+	 private RuleBasedPartitioner createJavaPartitioner() {

+		return new RuleBasedPartitioner(getJavaPartitionScanner(), TYPES);

+	}

+	

+	/**

+	 * Return a scanner for creating java partitions.

+	 */

+	 private JavaPartitionScanner getJavaPartitionScanner() {

+		if (fgScanner == null)

+			fgScanner= new JavaPartitionScanner();

+		return fgScanner;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
new file mode 100644
index 0000000..af6f88e
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
@@ -0,0 +1,134 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ResourceBundle;

+import org.eclipse.core.runtime.CoreException;

+import org.eclipse.core.runtime.IProgressMonitor;

+import org.eclipse.jface.action.MenuManager;

+import org.eclipse.jface.text.source.ISourceViewer;

+import org.eclipse.ui.IEditorInput;

+import org.eclipse.ui.editors.text.TextEditor;

+import org.eclipse.ui.texteditor.DefaultRangeIndicator;

+import org.eclipse.ui.texteditor.TextOperationAction;

+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;

+

+/**

+ * Java specific text editor.

+ */

+public class JavaEditor extends TextEditor {

+

+	/** The outline page */

+	private JavaContentOutlinePage fOutlinePage;

+

+	/**

+	 * Default constructor.

+	 */

+	public JavaEditor() {

+		super();

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method extend the 

+	 * actions to add those specific to the receiver

+	 */

+	protected void createActions() {

+		super.createActions();

+		setAction("ContentAssistProposal", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS)); //$NON-NLS-1$ //$NON-NLS-2$

+		setAction("ContentAssistTip", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistTip.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION)); //$NON-NLS-1$ //$NON-NLS-2$

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs any extra 

+	 * disposal actions required by the java editor.

+	 */

+	public void dispose() {

+		JavaEditorEnvironment.disconnect(this);

+		if (fOutlinePage != null)

+			fOutlinePage.setInput(null);

+		super.dispose();

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs any extra 

+	 * revert behavior required by the java editor.

+	 */

+	public void doRevertToSaved() {

+		super.doRevertToSaved();

+		if (fOutlinePage != null)

+			fOutlinePage.update();

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs any extra 

+	 * save behavior required by the java editor.

+	 */

+	public void doSave(IProgressMonitor monitor) {

+		super.doSave(monitor);

+		if (fOutlinePage != null)

+			fOutlinePage.update();

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs any extra 

+	 * save as behavior required by the java editor.

+	 */

+	public void doSaveAs() {

+		super.doSaveAs();

+		if (fOutlinePage != null)

+			fOutlinePage.update();

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs sets the 

+	 * input of the outline page after AbstractTextEditor has set input.

+	 */ 

+	public void doSetInput(IEditorInput input) throws CoreException {

+		super.doSetInput(input);

+		if (fOutlinePage != null)

+			fOutlinePage.setInput(input);

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method adds any 

+	 * JavaEditor specific entries.

+	 */ 

+	public void editorContextMenuAboutToShow(MenuManager menu) {

+		super.editorContextMenuAboutToShow(menu);

+		addAction(menu, "ContentAssistProposal"); //$NON-NLS-1$

+		addAction(menu, "ContentAssistTip"); //$NON-NLS-1$

+	}

+	

+	/** The <code>JavaEditor</code> implementation of this 

+	 * <code>AbstractTextEditor</code> method performs gets

+	 * the java content outline page if request is for a an 

+	 * outline page.

+	 */ 

+	public Object getAdapter(Class required) {

+		if (IContentOutlinePage.class.equals(required)) {

+			if (fOutlinePage == null) {

+				fOutlinePage= new JavaContentOutlinePage(getDocumentProvider(), this);

+				if (getEditorInput() != null)

+					fOutlinePage.setInput(getEditorInput());

+			}

+			return fOutlinePage;

+		}

+		return super.getAdapter(required);

+	}

+		

+	/* (non-Javadoc)

+	 * Method declared on AbstractTextEditor

+	 */

+	protected void initializeEditor() {

+

+		JavaEditorEnvironment.connect(this);

+

+		setSourceViewerConfiguration(new JavaSourceViewerConfiguration());

+		setRangeIndicator(new DefaultRangeIndicator());

+		setEditorContextMenuId("#JavaEditorContext"); //$NON-NLS-1$

+		setRulerContextMenuId("#JavaRulerContext"); //$NON-NLS-1$

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorEnvironment.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorEnvironment.java
new file mode 100644
index 0000000..5849127
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorEnvironment.java
@@ -0,0 +1,67 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.rules.RuleBasedScanner;

+import org.eclipse.ui.examples.javaeditor.java.JavaCodeScanner;

+import org.eclipse.ui.examples.javaeditor.javadoc.JavaDocScanner;

+import org.eclipse.ui.examples.javaeditor.util.JavaColorProvider;

+

+/** The JavaEditorEnvironment maintains singletons used by the java editor

+ * examples.

+ */

+public class JavaEditorEnvironment {

+

+	private static JavaColorProvider fgColorProvider;

+	private static JavaCodeScanner fgCodeScanner;

+	private static JavaDocScanner fgDocScanner;

+

+	private static int fgRefCount= 0;

+

+	/**

+	 * A connection has occured - initialize the receiver if it is the first activation.

+	 */

+	public static void connect(Object client) {

+		if (++fgRefCount == 1) {

+			fgColorProvider= new JavaColorProvider();

+			fgCodeScanner= new JavaCodeScanner(fgColorProvider);

+			fgDocScanner= new JavaDocScanner(fgColorProvider);

+		}

+	}

+	

+	/**

+	 * A disconnection has occured - clear the receiver if it is the last deactivation.

+	 */

+	 public static void disconnect(Object client) {

+		if (--fgRefCount == 0) {

+			fgCodeScanner= null;

+			fgDocScanner= null;

+			fgColorProvider.dispose();

+			fgColorProvider= null;

+		}

+	}

+	

+	/**

+	 * Returns the singleton scanner.

+	 */

+	 public static RuleBasedScanner getJavaCodeScanner() {

+		return fgCodeScanner;

+	}

+	

+	/**

+	 * Returns the singleton color provider.

+	 */

+	 public static JavaColorProvider getJavaColorProvider() {

+		return fgColorProvider;

+	}

+	

+	/**

+	 * Returns the singleton document scanner.

+	 */

+	 public static RuleBasedScanner getJavaDocScanner() {

+		return fgDocScanner;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.java
new file mode 100644
index 0000000..ff30b90
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.java
@@ -0,0 +1,30 @@
+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+package org.eclipse.ui.examples.javaeditor;

+

+import java.util.MissingResourceException;

+import java.util.ResourceBundle;

+

+public class JavaEditorMessages {

+

+	private static final String RESOURCE_BUNDLE= "org.eclipse.ui.examples.javaeditor.JavaEditorMessages";//$NON-NLS-1$

+

+	private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);

+

+	private JavaEditorMessages() {

+	}

+

+	public static String getString(String key) {

+		try {

+			return fgResourceBundle.getString(key);

+		} catch (MissingResourceException e) {

+			return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$

+		}

+	}

+	

+	public static ResourceBundle getResourceBundle() {

+		return fgResourceBundle;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.properties b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.properties
new file mode 100644
index 0000000..89a655d
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditorMessages.properties
@@ -0,0 +1,33 @@
+#############################################################

+#

+# (c) Copyright IBM Corp. 2000, 2001.

+# All Rights Reserved.

+#

+#############################################################

+

+## Actions ##

+

+ContentAssistProposal.label=Content Assist@Ctrl+SPACE

+ContentAssistProposal.tooltip=Content Assist

+ContentAssistProposal.image=

+ContentAssistProposal.description=Content Assist

+

+ContentAssistTip.label=Content Tip@Ctrl+SHIFT+SPACE

+ContentAssistTip.tooltip=Content Tip

+ContentAssistTip.image=

+ContentAssistTip.description=Content Tip

+

+TogglePresentation.label=Change Presentation

+TogglePresentation.tooltip=Enable/Disable Segmented Source Viewer

+TogglePresentation.image=togglepresentation.gif

+TogglePresentation.description=Enable/Disable Segmented Source Viewer

+

+OutlinePage.segment.title_pattern=position {0}

+

+AutoIndent.error.bad_location_1=JavaAutoIndentStrategy.getAutoIndentString: BadLocationException

+AutoIndent.error.bad_location_2=JavaAutoIndentStrategy.calcShiftBackReplace: BadLocationException

+

+CompletionProcessor.ContextInfo.display.pattern=proposal {0} at position {1}

+CompletionProcessor.ContextInfo.value.pattern=proposal {0} valid from {1} to {2}

+CompletionProcessor.Proposal.ContextInfo.pattern={0} valid 5 characters around insertion point

+CompletionProcessor.Proposal.hoverinfo.pattern=Java keyword: {0}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaSourceViewerConfiguration.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaSourceViewerConfiguration.java
new file mode 100644
index 0000000..b911cd4
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaSourceViewerConfiguration.java
@@ -0,0 +1,137 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.swt.graphics.RGB;

+import org.eclipse.jface.text.DefaultAutoIndentStrategy;

+import org.eclipse.jface.text.IAutoIndentStrategy;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.ITextDoubleClickStrategy;

+import org.eclipse.jface.text.ITextHover;

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.contentassist.ContentAssistant;

+import org.eclipse.jface.text.contentassist.IContentAssistant;

+import org.eclipse.jface.text.presentation.IPresentationReconciler;

+import org.eclipse.jface.text.presentation.PresentationReconciler;

+import org.eclipse.jface.text.rules.RuleBasedDamagerRepairer;

+import org.eclipse.jface.text.source.IAnnotationHover;

+import org.eclipse.jface.text.source.ISourceViewer;

+import org.eclipse.jface.text.source.SourceViewerConfiguration;

+import org.eclipse.ui.examples.javaeditor.java.JavaAutoIndentStrategy;

+import org.eclipse.ui.examples.javaeditor.java.JavaCompletionProcessor;

+import org.eclipse.ui.examples.javaeditor.java.JavaDoubleClickSelector;

+import org.eclipse.ui.examples.javaeditor.java.JavaPartitionScanner;

+import org.eclipse.ui.examples.javaeditor.javadoc.JavaDocCompletionProcessor;

+import org.eclipse.ui.examples.javaeditor.util.JavaColorProvider;

+

+/**

+ * Example configuration for an <code>SourceViewer</code> which shows Java code.

+ */

+public class JavaSourceViewerConfiguration extends SourceViewerConfiguration {

+

+	/**

+	 * Default constructor.

+	 */

+	public JavaSourceViewerConfiguration() {

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {

+		return new JavaAnnotationHover();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer, String contentType) {

+		return (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType) ? new JavaAutoIndentStrategy() : new DefaultAutoIndentStrategy());

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {

+		return new String[] { IDocument.DEFAULT_CONTENT_TYPE, JavaPartitionScanner.JAVA_DOC, JavaPartitionScanner.JAVA_MULTILINE_COMMENT };

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {

+

+		ContentAssistant assistant= new ContentAssistant();

+		assistant.setContentAssistProcessor(new JavaCompletionProcessor(), IDocument.DEFAULT_CONTENT_TYPE);

+		assistant.setContentAssistProcessor(new JavaDocCompletionProcessor(), JavaPartitionScanner.JAVA_DOC);

+

+		assistant.enableAutoActivation(true);

+		assistant.setAutoActivationDelay(500);

+		assistant.setProposalPopupOrientation(assistant.PROPOSAL_OVERLAY);

+		assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE);

+		assistant.setContextInformationPopupBackground(JavaEditorEnvironment.getJavaColorProvider().getColor(new RGB(150, 150, 0)));

+

+		return assistant;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public String getDefaultPrefix(ISourceViewer sourceViewer, String contentType) {

+		return (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType) ? "//" : null); //$NON-NLS-1$

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {

+		return new JavaDoubleClickSelector();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {

+		return new String[] { "\t", "    " }; //$NON-NLS-1$ //$NON-NLS-2$

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {

+

+		JavaColorProvider provider= JavaEditorEnvironment.getJavaColorProvider();

+		PresentationReconciler reconciler= new PresentationReconciler();

+

+		RuleBasedDamagerRepairer dr= new RuleBasedDamagerRepairer(JavaEditorEnvironment.getJavaCodeScanner(), new TextAttribute(provider.getColor(provider.DEFAULT)));

+		reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);

+		reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

+

+		dr= new RuleBasedDamagerRepairer(JavaEditorEnvironment.getJavaDocScanner(), new TextAttribute(provider.getColor(provider.JAVADOC_DEFAULT)));

+		reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC);

+		reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC);

+

+		dr= new RuleBasedDamagerRepairer(null, new TextAttribute(provider.getColor(provider.MULTI_LINE_COMMENT)));

+		reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);

+		reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);

+

+		return reconciler;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public int getTabWidth(ISourceViewer sourceViewer) {

+		return 4;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on SourceViewerConfiguration

+	 */

+	public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {

+		return new JavaTextHover();

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java
new file mode 100644
index 0000000..3c1f3a8
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java
@@ -0,0 +1,42 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.swt.graphics.Point;

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.IRegion;

+import org.eclipse.jface.text.ITextHover;

+import org.eclipse.jface.text.ITextViewer;

+import org.eclipse.jface.text.Region;

+

+/**

+ * Example implementation for an <code>ITextHover</code> which hovers over Java code.

+ */

+public class JavaTextHover implements ITextHover {

+

+	/* (non-Javadoc)

+	 * Method declared on ITextHover

+	 */

+	public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {

+		if (hoverRegion != null) {

+			try {

+				return textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());

+			} catch (BadLocationException x) {

+			}

+		}

+		return null;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on ITextHover

+	 */

+	public IRegion getHoverRegion(ITextViewer textViewer, int offset) {

+		Point selection= textViewer.getSelectedRange();

+		if (selection.y > 0 && selection.x <= offset && offset <= selection.x + selection.y)

+			return new Region(selection.x, selection.y);

+		return null;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/PresentationAction.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/PresentationAction.java
new file mode 100644
index 0000000..625fbd2
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/PresentationAction.java
@@ -0,0 +1,47 @@
+package org.eclipse.ui.examples.javaeditor;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ResourceBundle;

+import org.eclipse.ui.texteditor.ITextEditor;

+import org.eclipse.ui.texteditor.TextEditorAction;

+

+/**

+ * A toolbar action which toggles the presentation model of the

+ * connected text editor. The editor shows either the highlight range

+ * only or always the whole document.

+ */

+public class PresentationAction extends TextEditorAction {

+

+	/**

+	 * Constructs and updates the action.

+	 */

+	public PresentationAction() {

+		super(JavaEditorMessages.getResourceBundle(), "TogglePresentation.", null); //$NON-NLS-1$

+		update();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IAction

+	 */

+	public void run() {

+

+		ITextEditor editor= getTextEditor();

+

+		editor.resetHighlightRange();

+		boolean show= editor.showsHighlightRangeOnly();

+		setChecked(!show);

+		editor.showHighlightRangeOnly(!show);

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on TextEditorAction

+	 */

+	public void update() {

+		setChecked(getTextEditor() != null && getTextEditor().showsHighlightRangeOnly());

+		setEnabled(true);

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
new file mode 100644
index 0000000..d47ab8b
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
@@ -0,0 +1,265 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.DefaultAutoIndentStrategy;

+import org.eclipse.jface.text.DocumentCommand;

+import org.eclipse.jface.text.IDocument;

+

+/**

+ * Auto indent strategy sensitive to brackets.

+ */

+public class JavaAutoIndentStrategy extends DefaultAutoIndentStrategy {

+

+	public JavaAutoIndentStrategy() {

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IAutoIndentStrategy

+	 */

+	public void customizeDocumentCommand(IDocument d, DocumentCommand c) {

+		if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text))

+			smartIndentAfterNewLine(d, c);

+		else if ("}".equals(c.text)) { //$NON-NLS-1$

+			smartInsertAfterBracket(d, c);

+		}

+	}

+	

+	/**

+	 * Returns whether or not the text ends with one of the given search strings.

+	 */

+	private boolean endsWithDelimiter(IDocument d, String txt) {

+

+		String[] delimiters= d.getLegalLineDelimiters();

+

+		for (int i= 0; i < delimiters.length; i++) {

+			if (txt.endsWith(delimiters[i]))

+				return true;

+		}

+

+		return false;

+	}

+	

+	/**

+	 * Returns the line number of the next bracket after end.

+	 * @returns the line number of the next matching bracket after end

+	 * @param document - the document being parsed

+	 * @param line - the line to start searching back from

+	 * @param end - the end position to search back from

+	 * @param closingBracketIncrease - the number of brackets to skip

+	 */

+	 protected int findMatchingOpenBracket(IDocument document, int line, int end, int closingBracketIncrease) throws BadLocationException {

+

+		int start= document.getLineOffset(line);

+		int brackcount= getBracketCount(document, start, end, false) - closingBracketIncrease;

+

+		// sum up the brackets counts of each line (closing brackets count negative, 

+		// opening positive) until we find a line the brings the count to zero

+		while (brackcount < 0) {

+			line--;

+			if (line < 0) {

+				return -1;

+			}

+			start= document.getLineOffset(line);

+			end= start + document.getLineLength(line) - 1;

+			brackcount += getBracketCount(document, start, end, false);

+		}

+		return line;

+	}

+	

+	/**

+	 * Returns the bracket value of a section of text. Closing brackets have a value of -1 and 

+	 * open brackets have a value of 1.

+	 * @returns the line number of the next matching bracket after end

+	 * @param document - the document being parsed

+	 * @param start - the start position for the search

+	 * @param end - the end position for the search

+	 * @param ignoreCloseBrackets - whether or not to ignore closing brackets in the count

+	 */

+	 private int getBracketCount(IDocument document, int start, int end, boolean ignoreCloseBrackets) throws BadLocationException {

+

+		int begin = start;

+		int bracketcount= 0;

+		while (begin < end) {

+			char curr= document.getChar(begin);

+			begin++;

+			switch (curr) {

+				case '/' :

+					if (begin < end) {

+						char next= document.getChar(begin);

+						if (next == '*') {

+							// a comment starts, advance to the comment end

+							begin= getCommentEnd(document, begin + 1, end);

+						} else if (next == '/') {

+							// '//'-comment: nothing to do anymore on this line 

+							begin= end;

+						}

+					}

+					break;

+				case '*' :

+					if (begin < end) {

+						char next= document.getChar(begin);

+						if (next == '/') {

+							// we have been in a comment: forget what we read before

+							bracketcount= 0;

+							begin++;

+						}

+					}

+					break;

+				case '{' :

+					bracketcount++;

+					ignoreCloseBrackets= false;

+					break;

+				case '}' :

+					if (!ignoreCloseBrackets) {

+						bracketcount--;

+					}

+					break;

+				case '"' :

+				case '\'' :

+					begin= getStringEnd(document, begin, end, curr);

+					break;

+				default :

+					}

+		}

+		return bracketcount;

+	}

+	

+	/**

+	 * Returns the end position a comment starting at pos.

+	 * @returns the end position a comment starting at pos

+	 * @param document - the document being parsed

+	 * @param position - the start position for the search

+	 * @param end - the end position for the search

+	 */

+	 private int getCommentEnd(IDocument document, int position, int end) throws BadLocationException {

+		int currentPosition = position;

+		while (currentPosition < end) {

+			char curr= document.getChar(currentPosition);

+			currentPosition++;

+			if (curr == '*') {

+				if (currentPosition < end && document.getChar(currentPosition) == '/') {

+					return currentPosition + 1;

+				}

+			}

+		}

+		return end;

+	}

+	

+	/**

+	 * Returns the String at line with the leading whitespace removed.

+	 * @returns the String at line with the leading whitespace removed.

+	 * @param document - the document being parsed

+	 * @param line - the line being searched

+	 */

+	 protected String getIndentOfLine(IDocument document, int line) throws BadLocationException {

+		if (line > -1) {

+			int start= document.getLineOffset(line);

+			int end= start + document.getLineLength(line) - 1;

+			int whiteend= findEndOfWhiteSpace(document, start, end);

+			return document.get(start, whiteend - start);

+		} else {

+			return ""; //$NON-NLS-1$

+		}

+	}

+	

+	/**

+	 * Returns the position of the character in the document after position.

+	 * @returns the next location of character.

+	 * @param document - the document being parsed

+	 * @param position - the position to start searching from

+	 * @param end - the end of the document

+	 * @param character - the character you are trying to match

+	 */

+	 private int getStringEnd(IDocument document, int position, int end, char character) throws BadLocationException {

+		int currentPosition = position;

+		while (currentPosition < end) {

+			char currentCharacter= document.getChar(currentPosition);

+			currentPosition++;

+			if (currentCharacter == '\\') {

+				// ignore escaped characters

+				currentPosition++;

+			} else if (currentCharacter == character) {

+				return currentPosition;

+			}

+		}

+		return end;

+	}

+	

+	/**

+	 * Set the indent of a new line based on the command provided in the supplied document.

+	 * @param document - the document being parsed

+	 * @param command - the command being performed

+	 */

+	 protected void smartIndentAfterNewLine(IDocument document, DocumentCommand command) {

+

+		int docLength= document.getLength();

+		if (command.offset == -1 || docLength == 0)

+			return;

+

+		try {

+			int p= (command.offset == docLength ? command.offset - 1 : command.offset);

+			int line= document.getLineOfOffset(p);

+

+			StringBuffer buf= new StringBuffer(command.text);

+			if (command.offset < docLength && document.getChar(command.offset) == '}') {

+				int indLine= findMatchingOpenBracket(document, line, command.offset, 0);

+				if (indLine == -1) {

+					indLine= line;

+				}

+				buf.append(getIndentOfLine(document, indLine));

+			} else {

+				int start= document.getLineOffset(line);

+				int whiteend= findEndOfWhiteSpace(document, start, command.offset);

+				buf.append(document.get(start, whiteend - start));

+				if (getBracketCount(document, start, command.offset, true) > 0) {

+					buf.append('\t');

+				}

+			}

+			command.text= buf.toString();

+

+		} catch (BadLocationException excp) {

+			System.out.println(JavaEditorMessages.getString("AutoIndent.error.bad_location_1")); //$NON-NLS-1$

+		}

+	}

+	

+	/**

+	 * Set the indent of a bracket based on the command provided in the supplied document.

+	 * @param document - the document being parsed

+	 * @param command - the command being performed

+	 */

+	 protected void smartInsertAfterBracket(IDocument document, DocumentCommand command) {

+		if (command.offset == -1 || document.getLength() == 0)

+			return;

+

+		try {

+			int p= (command.offset == document.getLength() ? command.offset - 1 : command.offset);

+			int line= document.getLineOfOffset(p);

+			int start= document.getLineOffset(line);

+			int whiteend= findEndOfWhiteSpace(document, start, command.offset);

+

+			// shift only when line does not contain any text up to the closing bracket

+			if (whiteend == command.offset) {

+				// evaluate the line with the opening bracket that matches out closing bracket

+				int indLine= findMatchingOpenBracket(document, line, command.offset, 1);

+				if (indLine != -1 && indLine != line) {

+					// take the indent of the found line

+					StringBuffer replaceText= new StringBuffer(getIndentOfLine(document, indLine));

+					// add the rest of the current line including the just added close bracket

+					replaceText.append(document.get(whiteend, command.offset - whiteend));

+					replaceText.append(command.text);

+					// modify document command

+					command.length= command.offset - start;

+					command.offset= start;

+					command.text= replaceText.toString();

+				}

+			}

+		} catch (BadLocationException excp) {

+			System.out.println(JavaEditorMessages.getString("AutoIndent.error.bad_location_2")); //$NON-NLS-1$

+		}

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCodeScanner.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCodeScanner.java
new file mode 100644
index 0000000..fe88175
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCodeScanner.java
@@ -0,0 +1,77 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ArrayList;

+import java.util.List;

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.rules.EndOfLineRule;

+import org.eclipse.jface.text.rules.IRule;

+import org.eclipse.jface.text.rules.IToken;

+import org.eclipse.jface.text.rules.RuleBasedScanner;

+import org.eclipse.jface.text.rules.SingleLineRule;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.jface.text.rules.WhitespaceRule;

+import org.eclipse.jface.text.rules.WordRule;

+import org.eclipse.ui.examples.javaeditor.util.JavaColorProvider;

+import org.eclipse.ui.examples.javaeditor.util.JavaWhitespaceDetector;

+import org.eclipse.ui.examples.javaeditor.util.JavaWordDetector;

+

+/**

+ * A Java code scanner.

+ */

+public class JavaCodeScanner extends RuleBasedScanner {

+

+	private static String[] fgKeywords= { "abstract", "break", "case", "catch", "class", "continue", "default", "do", "else", "extends", "final", "finally", "for", "if", "implements", "import", "instanceof", "interface", "native", "new", "package", "private", "protected", "public", "return", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "try", "volatile", "while" }; //$NON-NLS-36$ //$NON-NLS-35$ //$NON-NLS-34$ //$NON-NLS-33$ //$NON-NLS-32$ //$NON-NLS-31$ //$NON-NLS-30$ //$NON-NLS-29$ //$NON-NLS-28$ //$NON-NLS-27$ //$NON-NLS-26$ //$NON-NLS-25$ //$NON-NLS-24$ //$NON-NLS-23$ //$NON-NLS-22$ //$NON-NLS-21$ //$NON-NLS-20$ //$NON-NLS-19$ //$NON-NLS-18$ //$NON-NLS-17$ //$NON-NLS-16$ //$NON-NLS-15$ //$NON-NLS-14$ //$NON-NLS-13$ //$NON-NLS-12$ //$NON-NLS-11$ //$NON-NLS-10$ //$NON-NLS-9$ //$NON-NLS-8$ //$NON-NLS-7$ //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

+

+	private static String[] fgTypes= { "void", "boolean", "char", "byte", "short", "int", "long", "float", "double" }; //$NON-NLS-1$ //$NON-NLS-5$ //$NON-NLS-7$ //$NON-NLS-6$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-2$

+

+	private static String[] fgConstants= { "false", "null", "true" }; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

+

+	private TextAttribute fComment;

+	private TextAttribute fKeyword;

+	private TextAttribute fType;

+	private TextAttribute fString;

+	private JavaColorProvider fColorProvider;

+

+	/**

+	 * Creates a Java code scanner

+	 */

+	public JavaCodeScanner(JavaColorProvider provider) {

+

+		IToken keyword= new Token(new TextAttribute(provider.getColor(JavaColorProvider.KEYWORD)));

+		IToken type= new Token(new TextAttribute(provider.getColor(JavaColorProvider.TYPE)));

+		IToken string= new Token(new TextAttribute(provider.getColor(JavaColorProvider.STRING)));

+		IToken comment= new Token(new TextAttribute(provider.getColor(JavaColorProvider.SINGLE_LINE_COMMENT)));

+		IToken other= new Token(new TextAttribute(provider.getColor(JavaColorProvider.DEFAULT)));

+

+		List rules= new ArrayList();

+

+		// Add rule for single line comments.

+		rules.add(new EndOfLineRule("//", comment)); //$NON-NLS-1$

+

+		// Add rule for strings and character constants.

+		rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$

+		rules.add(new SingleLineRule("'", "'", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$

+

+		// Add generic whitespace rule.

+		rules.add(new WhitespaceRule(new JavaWhitespaceDetector()));

+

+		// Add word rule for keywords, types, and constants.

+		WordRule wordRule= new WordRule(new JavaWordDetector(), other);

+		for (int i= 0; i < fgKeywords.length; i++)

+			wordRule.addWord(fgKeywords[i], keyword);

+		for (int i= 0; i < fgTypes.length; i++)

+			wordRule.addWord(fgTypes[i], type);

+		for (int i= 0; i < fgConstants.length; i++)

+			wordRule.addWord(fgConstants[i], type);

+		rules.add(wordRule);

+

+		IRule[] result= new IRule[rules.size()];

+		rules.toArray(result);

+		setRules(result);

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCompletionProcessor.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCompletionProcessor.java
new file mode 100644
index 0000000..9efa3ac
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaCompletionProcessor.java
@@ -0,0 +1,102 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.text.MessageFormat;

+

+import org.eclipse.jface.text.ITextViewer;

+import org.eclipse.jface.text.contentassist.CompletionProposal;

+import org.eclipse.jface.text.contentassist.ContextInformation;

+import org.eclipse.jface.text.contentassist.ICompletionProposal;

+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;

+import org.eclipse.jface.text.contentassist.IContextInformation;

+import org.eclipse.jface.text.contentassist.IContextInformationValidator;

+

+/**

+ * Example Java completion processor.

+ */

+public class JavaCompletionProcessor implements IContentAssistProcessor {

+

+	/**

+	 * Simple content assist tip closer. The tip is valid in a range

+	 * of 5 characters around its popup location.

+	 */

+	protected static class Validator implements IContextInformationValidator {

+

+		protected int fInstallOffset;

+

+		/*

+		 * @see IContextInformationValidator#isContextInformationValid(int)

+		 */

+		public boolean isContextInformationValid(int offset) {

+			return Math.abs(fInstallOffset - offset) < 5;

+		}

+

+		/*

+		 * @see IContextInformationValidator#install(IContextInformation, ITextViewer, int)

+		 */

+		public void install(IContextInformation info, ITextViewer viewer, int offset) {

+			fInstallOffset= offset;

+		}

+	};

+

+	protected final static String[] fgProposals=

+		{ "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "continue", "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "if", "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while" }; //$NON-NLS-48$ //$NON-NLS-47$ //$NON-NLS-46$ //$NON-NLS-45$ //$NON-NLS-44$ //$NON-NLS-43$ //$NON-NLS-42$ //$NON-NLS-41$ //$NON-NLS-40$ //$NON-NLS-39$ //$NON-NLS-38$ //$NON-NLS-37$ //$NON-NLS-36$ //$NON-NLS-35$ //$NON-NLS-34$ //$NON-NLS-33$ //$NON-NLS-32$ //$NON-NLS-31$ //$NON-NLS-30$ //$NON-NLS-29$ //$NON-NLS-28$ //$NON-NLS-27$ //$NON-NLS-26$ //$NON-NLS-25$ //$NON-NLS-24$ //$NON-NLS-23$ //$NON-NLS-22$ //$NON-NLS-21$ //$NON-NLS-20$ //$NON-NLS-19$ //$NON-NLS-18$ //$NON-NLS-17$ //$NON-NLS-16$ //$NON-NLS-15$ //$NON-NLS-14$ //$NON-NLS-13$ //$NON-NLS-12$ //$NON-NLS-11$ //$NON-NLS-10$ //$NON-NLS-9$ //$NON-NLS-8$ //$NON-NLS-7$ //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

+

+	protected IContextInformationValidator fValidator= new Validator();

+

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {

+		ICompletionProposal[] result= new ICompletionProposal[fgProposals.length];

+		for (int i= 0; i < fgProposals.length; i++) {

+			IContextInformation info= new ContextInformation(fgProposals[i], MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.Proposal.ContextInfo.pattern"), new Object[] { fgProposals[i] })); //$NON-NLS-1$

+			result[i]= new CompletionProposal(fgProposals[i], documentOffset, 0, fgProposals[i].length(), null, fgProposals[i], info, MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.Proposal.hoverinfo.pattern"), new Object[] { fgProposals[i]})); //$NON-NLS-1$

+		}

+		return result;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {

+		IContextInformation[] result= new IContextInformation[5];

+		for (int i= 0; i < result.length; i++)

+			result[i]= new ContextInformation(

+				MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.ContextInfo.display.pattern"), new Object[] { new Integer(i), new Integer(documentOffset) }),  //$NON-NLS-1$

+				MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.ContextInfo.value.pattern"), new Object[] { new Integer(i), new Integer(documentOffset - 5), new Integer(documentOffset + 5)})); //$NON-NLS-1$

+		return result;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public char[] getCompletionProposalAutoActivationCharacters() {

+		return new char[] { '.', '(' };

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public char[] getContextInformationAutoActivationCharacters() {

+		return new char[] { '#' };

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public IContextInformationValidator getContextInformationValidator() {

+		return fValidator;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public String getErrorMessage() {

+		return null;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
new file mode 100644
index 0000000..be1ea74
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
@@ -0,0 +1,234 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.ITextDoubleClickStrategy;

+import org.eclipse.jface.text.ITextViewer;

+

+/**

+ * Double click strategy aware of Java identifier syntax rules.

+ */

+public class JavaDoubleClickSelector implements ITextDoubleClickStrategy {

+

+	protected ITextViewer fText;

+	protected int fPos;

+	protected int fStartPos;

+	protected int fEndPos;

+

+	protected static char[] fgBrackets= { '{', '}', '(', ')', '[', ']', '"', '"' };

+

+	/* 

+	 * Create a JavaDoubleClickSelector.

+	 */

+	 public JavaDoubleClickSelector() {

+		super();

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on ITextDoubleClickStrategy

+	 */

+	public void doubleClicked(ITextViewer text) {

+

+		fPos= text.getSelectedRange().x;

+

+		if (fPos < 0)

+			return;

+

+		fText= text;

+

+		if (!selectBracketBlock())

+			selectWord();

+	}

+	

+	/**

+	 * Match the brackets at the current selection. Return true if successful,

+	 * false otherwise.

+	 */

+	 protected boolean matchBracketsAt() {

+

+		char prevChar, nextChar;

+

+		int i;

+		int bracketIndex1= fgBrackets.length;

+		int bracketIndex2= fgBrackets.length;

+

+		fStartPos= -1;

+		fEndPos= -1;

+

+		// get the chars preceding and following the start position

+		try {

+

+			IDocument doc= fText.getDocument();

+

+			prevChar= doc.getChar(fPos - 1);

+			nextChar= doc.getChar(fPos);

+

+			// is the char either an open or close bracket?

+			for (i= 0; i < fgBrackets.length; i= i + 2) {

+				if (prevChar == fgBrackets[i]) {

+					fStartPos= fPos - 1;

+					bracketIndex1= i;

+				}

+			}

+			for (i= 1; i < fgBrackets.length; i= i + 2) {

+				if (nextChar == fgBrackets[i]) {

+					fEndPos= fPos;

+					bracketIndex2= i;

+				}

+			}

+

+			if (fStartPos > -1 && bracketIndex1 < bracketIndex2) {

+				fEndPos= searchForClosingBracket(fStartPos, prevChar, fgBrackets[bracketIndex1 + 1], doc);

+				if (fEndPos > -1)

+					return true;

+				else

+					fStartPos= -1;

+			} else if (fEndPos > -1) {

+				fStartPos= searchForOpenBracket(fEndPos, fgBrackets[bracketIndex2 - 1], nextChar, doc);

+				if (fStartPos > -1)

+					return true;

+				else

+					fEndPos= -1;

+			}

+

+		} catch (BadLocationException x) {

+		}

+

+		return false;

+	}

+	

+	/**

+	 * Select the word at the current selection. Return true if successful,

+	 * false otherwise.

+	 */

+	 protected boolean matchWord() {

+

+		IDocument doc= fText.getDocument();

+

+		try {

+

+			int pos= fPos;

+			char c;

+

+			while (pos >= 0) {

+				c= doc.getChar(pos);

+				if (!Character.isJavaIdentifierPart(c))

+					break;

+				--pos;

+			}

+

+			fStartPos= pos;

+

+			pos= fPos;

+			int length= doc.getLength();

+

+			while (pos < length) {

+				c= doc.getChar(pos);

+				if (!Character.isJavaIdentifierPart(c))

+					break;

+				++pos;

+			}

+

+			fEndPos= pos;

+

+			return true;

+

+		} catch (BadLocationException x) {

+		}

+

+		return false;

+	}

+	

+	/**

+	 * Returns the position of the closing bracket after startPosition.

+	 * @returns the location of the closing bracket.

+	 * @param startPosition - the beginning position

+	 * @param openBracket - the character that represents the open bracket

+	 * @param closeBracket - the character that represents the close bracket

+	 * @param document - the document being searched

+	 */

+	 protected int searchForClosingBracket(int startPosition, char openBracket, char closeBracket, IDocument document) throws BadLocationException {

+		int stack= 1;

+		int closePosition= startPosition + 1;

+		int length= document.getLength();

+		char nextChar;

+

+		while (closePosition < length && stack > 0) {

+			nextChar= document.getChar(closePosition);

+			if (nextChar == openBracket && nextChar != closeBracket)

+				stack++;

+			else if (nextChar == closeBracket)

+				stack--;

+			closePosition++;

+		}

+

+		if (stack == 0)

+			return closePosition - 1;

+		else

+			return -1;

+

+	}

+	

+	/**

+	 * Returns the position of the open bracket before startPosition.

+	 * @returns the location of the starting bracket.

+	 * @param startPosition - the beginning position

+	 * @param openBracket - the character that represents the open bracket

+	 * @param closeBracket - the character that represents the close bracket

+	 * @param document - the document being searched

+	 */

+	 protected int searchForOpenBracket(int startPosition, char openBracket, char closeBracket, IDocument document) throws BadLocationException {

+		int stack= 1;

+		int openPos= startPosition - 1;

+		char nextChar;

+

+		while (openPos >= 0 && stack > 0) {

+			nextChar= document.getChar(openPos);

+			if (nextChar == closeBracket && nextChar != openBracket)

+				stack++;

+			else if (nextChar == openBracket)

+				stack--;

+			openPos--;

+		}

+

+		if (stack == 0)

+			return openPos + 1;

+		else

+			return -1;

+	}

+	

+	/**

+	 * Select the area between the selected bracket and the closing bracket. Return

+	 * true if successful.

+	 */

+	 protected boolean selectBracketBlock() {

+		if (matchBracketsAt()) {

+

+			if (fStartPos == fEndPos)

+				fText.setSelectedRange(fStartPos, 0);

+			else

+				fText.setSelectedRange(fStartPos + 1, fEndPos - fStartPos - 1);

+

+			return true;

+		}

+		return false;

+	}

+	

+	/**

+	 * Select the word at the current selection. 

+	 */

+	 protected void selectWord() {

+		if (matchWord()) {

+

+			if (fStartPos == fEndPos)

+				fText.setSelectedRange(fStartPos, 0);

+			else

+				fText.setSelectedRange(fStartPos + 1, fEndPos - fStartPos - 1);

+		}

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaEditorMessages.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaEditorMessages.java
new file mode 100644
index 0000000..85984c6
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaEditorMessages.java
@@ -0,0 +1,26 @@
+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+package org.eclipse.ui.examples.javaeditor.java;

+

+import java.util.MissingResourceException;

+import java.util.ResourceBundle;

+

+public class JavaEditorMessages {

+

+	private static final String RESOURCE_BUNDLE= "org.eclipse.ui.examples.javaeditor.JavaEditorMessages";//$NON-NLS-1$

+

+	private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);

+

+	private JavaEditorMessages() {

+	}

+

+	public static String getString(String key) {

+		try {

+			return fgResourceBundle.getString(key);

+		} catch (MissingResourceException e) {

+			return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$

+		}

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaPartitionScanner.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaPartitionScanner.java
new file mode 100644
index 0000000..e817770
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaPartitionScanner.java
@@ -0,0 +1,81 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ArrayList;

+import java.util.List;

+import org.eclipse.jface.text.rules.EndOfLineRule;

+import org.eclipse.jface.text.rules.IRule;

+import org.eclipse.jface.text.rules.IToken;

+import org.eclipse.jface.text.rules.IWordDetector;

+import org.eclipse.jface.text.rules.MultiLineRule;

+import org.eclipse.jface.text.rules.RuleBasedScanner;

+import org.eclipse.jface.text.rules.SingleLineRule;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.jface.text.rules.WordRule;

+

+/**

+ * This scanner recognizes the JavaDoc comments and Java multi line comments.

+ */

+public class JavaPartitionScanner extends RuleBasedScanner {

+

+	private final static String SKIP= "__skip"; //$NON-NLS-1$

+

+	public final static String JAVA_MULTILINE_COMMENT= "__java_multiline_comment"; //$NON-NLS-1$

+	public final static String JAVA_DOC= "__java_javadoc"; //$NON-NLS-1$

+

+	/**

+	 * Detector for empty comments.

+	 */

+	static class EmptyCommentDetector implements IWordDetector {

+

+		/* (non-Javadoc)

+		* Method declared on IWordDetector

+	 	*/

+		public boolean isWordStart(char c) {

+			return (c == '/');

+		}

+

+		/* (non-Javadoc)

+		* Method declared on IWordDetector

+	 	*/

+		public boolean isWordPart(char c) {

+			return (c == '*' || c == '/');

+		}

+	};

+

+	/**

+	 * Creates the partitioner and sets up the appropriate rules.

+	 */

+	public JavaPartitionScanner() {

+		super();

+

+		IToken javaDoc= new Token(JAVA_DOC);

+		IToken comment= new Token(JAVA_MULTILINE_COMMENT);

+

+		List rules= new ArrayList();

+

+		// Add rule for single line comments.

+		rules.add(new EndOfLineRule("//", Token.UNDEFINED)); //$NON-NLS-1$

+

+		// Add rule for strings and character constants.

+		rules.add(new SingleLineRule("\"", "\"", Token.UNDEFINED, '\\')); //$NON-NLS-2$ //$NON-NLS-1$

+		rules.add(new SingleLineRule("'", "'", Token.UNDEFINED, '\\')); //$NON-NLS-2$ //$NON-NLS-1$

+

+		// Add special case word rule.

+		WordRule wordRule= new WordRule(new EmptyCommentDetector());

+		wordRule.addWord("/**/", comment); //$NON-NLS-1$

+		rules.add(wordRule);

+

+		// Add rules for multi-line comments and javadoc.

+		rules.add(new MultiLineRule("/**", "*/", javaDoc)); //$NON-NLS-1$ //$NON-NLS-2$

+		rules.add(new MultiLineRule("/*", "*/", comment)); //$NON-NLS-1$ //$NON-NLS-2$

+

+		IRule[] result= new IRule[rules.size()];

+		rules.toArray(result);

+		setRules(result);

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java
new file mode 100644
index 0000000..6aaf285
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaWordDetector.java
@@ -0,0 +1,63 @@
+package org.eclipse.ui.examples.javaeditor.java;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.swt.graphics.Point;

+import org.eclipse.jface.text.BadLocationException;

+import org.eclipse.jface.text.IDocument;

+

+/**

+ * Detects Java words in documents.

+ */

+public class JavaWordDetector {

+

+	/**

+	 * Find the location of the word at offset in document.

+	 * @returns Point - x is the start position, y is the end position.

+	 * 	Return null if it is not found.

+	 * @param document the document being searched.

+	 * @param offset - the position to start searching from.

+	 */

+	 public static Point findWord(IDocument document, int offset) {

+

+		int start= -1;

+		int end= -1;

+

+		try {

+

+			int position= offset;

+			char character;

+

+			while (position >= 0) {

+				character= document.getChar(position);

+				if (!Character.isJavaIdentifierPart(character))

+					break;

+				--position;

+			}

+

+			start= position;

+

+			position= offset;

+			int length= document.getLength();

+

+			while (position < length) {

+				character= document.getChar(position);

+				if (!Character.isJavaIdentifierPart(character))

+					break;

+				++position;

+			}

+

+			end= position;

+

+			if (end > start)

+				return new Point(start, end - start);

+

+		} catch (BadLocationException x) {

+		}

+

+		return null;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocCompletionProcessor.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocCompletionProcessor.java
new file mode 100644
index 0000000..b999408
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocCompletionProcessor.java
@@ -0,0 +1,66 @@
+package org.eclipse.ui.examples.javaeditor.javadoc;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.ITextViewer;

+import org.eclipse.jface.text.contentassist.CompletionProposal;

+import org.eclipse.jface.text.contentassist.ICompletionProposal;

+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;

+import org.eclipse.jface.text.contentassist.IContextInformation;

+import org.eclipse.jface.text.contentassist.IContextInformationValidator;

+

+/**

+ * Example Java doc completion processor.

+ */

+public class JavaDocCompletionProcessor implements IContentAssistProcessor {

+

+	protected final static String[] fgProposals= { "@author", "@deprecated", "@exception", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" }; //$NON-NLS-12$ //$NON-NLS-11$ //$NON-NLS-10$ //$NON-NLS-7$ //$NON-NLS-9$ //$NON-NLS-8$ //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

+

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {

+		ICompletionProposal[] result= new ICompletionProposal[fgProposals.length];

+		for (int i= 0; i < fgProposals.length; i++)

+			result[i]= new CompletionProposal(fgProposals[i], documentOffset, 0, fgProposals[i].length());

+		return result;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {

+		return null;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public char[] getCompletionProposalAutoActivationCharacters() {

+		return null;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public char[] getContextInformationAutoActivationCharacters() {

+		return null;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public IContextInformationValidator getContextInformationValidator() {

+		return null;

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IContentAssistProcessor

+	 */

+	public String getErrorMessage() {

+		return null;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocScanner.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocScanner.java
new file mode 100644
index 0000000..55dc569
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/javadoc/JavaDocScanner.java
@@ -0,0 +1,80 @@
+package org.eclipse.ui.examples.javaeditor.javadoc;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.ArrayList;

+import java.util.List;

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.rules.IRule;

+import org.eclipse.jface.text.rules.IToken;

+import org.eclipse.jface.text.rules.IWordDetector;

+import org.eclipse.jface.text.rules.RuleBasedScanner;

+import org.eclipse.jface.text.rules.SingleLineRule;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.jface.text.rules.WhitespaceRule;

+import org.eclipse.jface.text.rules.WordRule;

+import org.eclipse.ui.examples.javaeditor.util.JavaColorProvider;

+import org.eclipse.ui.examples.javaeditor.util.JavaWhitespaceDetector;

+

+/**

+ * A rule based JavaDoc scanner.

+ */

+public class JavaDocScanner extends RuleBasedScanner {

+

+	/**

+	 * A key word detector.

+	 */

+	static class JavaDocWordDetector implements IWordDetector {

+

+	/* (non-Javadoc)

+	 * Method declared on IWordDetector

+	 */

+		public boolean isWordStart(char c) {

+			return (c == '@');

+		}

+

+		/* (non-Javadoc)

+	 	* Method declared on IWordDetector

+	 	*/

+		public boolean isWordPart(char c) {

+			return Character.isLetter(c);

+		}

+	};

+

+	private static String[] fgKeywords= { "@author", "@deprecated", "@exception", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" }; //$NON-NLS-12$ //$NON-NLS-11$ //$NON-NLS-10$ //$NON-NLS-7$ //$NON-NLS-9$ //$NON-NLS-8$ //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$

+

+	/**

+	 * Create a new java doc scanner.

+	 */

+	 public JavaDocScanner(JavaColorProvider provider) {

+		super();

+

+		IToken keyword= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_KEYWORD)));

+		IToken tag= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_TAG)));

+		IToken link= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_LINK)));

+

+		List list= new ArrayList();

+

+		// Add rule for tags.

+		list.add(new SingleLineRule("<", ">", tag)); //$NON-NLS-2$ //$NON-NLS-1$

+

+		// Add rule for links.

+		list.add(new SingleLineRule("{", "}", link)); //$NON-NLS-2$ //$NON-NLS-1$

+

+		// Add generic whitespace rule.

+		list.add(new WhitespaceRule(new JavaWhitespaceDetector()));

+

+		// Add word rule for keywords.

+		WordRule wordRule= new WordRule(new JavaDocWordDetector());

+		for (int i= 0; i < fgKeywords.length; i++)

+			wordRule.addWord(fgKeywords[i], keyword);

+		list.add(wordRule);

+

+		IRule[] result= new IRule[list.size()];

+		list.toArray(result);

+		setRules(result);

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/togglepresentation.gif b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/togglepresentation.gif
new file mode 100644
index 0000000..a0831f0
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/togglepresentation.gif
Binary files differ
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaColorProvider.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaColorProvider.java
new file mode 100644
index 0000000..35c786b
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaColorProvider.java
@@ -0,0 +1,53 @@
+package org.eclipse.ui.examples.javaeditor.util;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import java.util.HashMap;

+import java.util.Iterator;

+import java.util.Map;

+import org.eclipse.swt.graphics.Color;

+import org.eclipse.swt.graphics.RGB;

+import org.eclipse.swt.widgets.Display;

+

+/**

+ * Manager for colors used in the Java editor

+ */

+public class JavaColorProvider {

+

+	public static final RGB MULTI_LINE_COMMENT= new RGB(128, 0, 0);

+	public static final RGB SINGLE_LINE_COMMENT= new RGB(128, 128, 0);

+	public static final RGB KEYWORD= new RGB(0, 0, 128);

+	public static final RGB TYPE= new RGB(0, 0, 128);

+	public static final RGB STRING= new RGB(0, 128, 0);

+	public static final RGB DEFAULT= new RGB(0, 0, 0);

+	public static final RGB JAVADOC_KEYWORD= new RGB(0, 128, 0);

+	public static final RGB JAVADOC_TAG= new RGB(128, 128, 128);

+	public static final RGB JAVADOC_LINK= new RGB(128, 128, 128);

+	public static final RGB JAVADOC_DEFAULT= new RGB(0, 128, 128);

+

+	protected Map fColorTable= new HashMap(10);

+

+	/**

+	 * Release all of the color resources held onto by the receiver.

+	 */	

+	public void dispose() {

+		Iterator e= fColorTable.values().iterator();

+		while (e.hasNext())

+			 ((Color) e.next()).dispose();

+	}

+	

+	/**

+	 * Return the Color that is stored in the Color table as rgb.

+	 */

+	public Color getColor(RGB rgb) {

+		Color color= (Color) fColorTable.get(rgb);

+		if (color == null) {

+			color= new Color(Display.getCurrent(), rgb);

+			fColorTable.put(rgb, color);

+		}

+		return color;

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWhitespaceDetector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWhitespaceDetector.java
new file mode 100644
index 0000000..a14a0eb
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWhitespaceDetector.java
@@ -0,0 +1,21 @@
+package org.eclipse.ui.examples.javaeditor.util;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.rules.IWhitespaceDetector;

+

+/**

+ * A java aware white space detector.

+ */

+public class JavaWhitespaceDetector implements IWhitespaceDetector {

+

+	/* (non-Javadoc)

+	 * Method declared on IWhitespaceDetector

+	 */

+	public boolean isWhitespace(char character) {

+		return Character.isWhitespace(character);

+	}

+}

diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWordDetector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWordDetector.java
new file mode 100644
index 0000000..5612604
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/util/JavaWordDetector.java
@@ -0,0 +1,28 @@
+package org.eclipse.ui.examples.javaeditor.util;

+

+/*

+ * (c) Copyright IBM Corp. 2000, 2001.

+ * All Rights Reserved.

+ */

+

+import org.eclipse.jface.text.rules.IWordDetector;

+

+/**

+ * A Java aware word detector.

+ */

+public class JavaWordDetector implements IWordDetector {

+

+	/* (non-Javadoc)

+	 * Method declared on IWordDetector.

+	 */

+	public boolean isWordPart(char character) {

+		return Character.isJavaIdentifierPart(character);

+	}

+	

+	/* (non-Javadoc)

+	 * Method declared on IWordDetector.

+	 */

+	public boolean isWordStart(char character) {

+		return Character.isJavaIdentifierStart(character);

+	}

+}